rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Daisuke Fujimura <ffujimurah@gmail.com>
To: Rack Development <rack-devel@googlegroups.com>
Subject: Patch: inconsistent behavior of Rack::Request#params
Date: Wed, 24 Nov 2010 20:15:19 -0800 (PST)	[thread overview]
Message-ID: <a7f1f209-9b81-4286-af5a-b8030d18af3b@z26g2000prf.googlegroups.com> (raw)

I found an inconsistent behavior of request.params.
Values in request.params which came from GET could be updated, but
from POST, it's not.

I find this in fixing middleware for Facebook platform.
Is this intented behavior?


This seems to be caused by that the returned value is GET values which
includes copy of POST values, not including actual instance of POST
values.

I wrote a patch(with test) to fix this.
This patch memoize params as instance variable. This makes values from
POST mutable.
https://github.com/fujimura/rack/commit/09ba684f07f182c52b4545da43d1f24ddc080101

Thank you in advance.

--
Fujimura Daisuke
http://fujimuradaisuke.com

                 reply	other threads:[~2010-11-25  5:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a7f1f209-9b81-4286-af5a-b8030d18af3b@z26g2000prf.googlegroups.com \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).