rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
* Patch: inconsistent behavior of Rack::Request#params
@ 2010-11-25  4:15 Daisuke Fujimura
  0 siblings, 0 replies; only message in thread
From: Daisuke Fujimura @ 2010-11-25  4:15 UTC (permalink / raw)
  To: Rack Development

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-11-25  5:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-25  4:15 Patch: inconsistent behavior of Rack::Request#params Daisuke Fujimura

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).