diff options
author | Miles Egan <milesegan@gmail.com> | 2010-07-18 09:10:20 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-10-12 00:56:07 +0200 |
commit | 3eff729079a1a9e717e7872bdae19c8703b280ac (patch) | |
tree | 83045b71ac448ffcf38fdf760b7b77f85cabf12a /actionpack/lib | |
parent | 933f745dcb107cea19e2552e3c6241a886c9984e (diff) | |
download | rails-3eff729079a1a9e717e7872bdae19c8703b280ac.tar.gz rails-3eff729079a1a9e717e7872bdae19c8703b280ac.tar.bz2 rails-3eff729079a1a9e717e7872bdae19c8703b280ac.zip |
make sure request parameters are accessible after rack throws an exception parsing the query string [#3030 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/http/request.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index bbcdefb190..55a3166f6d 100644 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -214,13 +214,13 @@ module ActionDispatch # Override Rack's GET method to support indifferent access def GET - @env["action_dispatch.request.query_parameters"] ||= normalize_parameters(super) + @env["action_dispatch.request.query_parameters"] ||= (normalize_parameters(super) || {}) end alias :query_parameters :GET # Override Rack's POST method to support indifferent access def POST - @env["action_dispatch.request.request_parameters"] ||= normalize_parameters(super) + @env["action_dispatch.request.request_parameters"] ||= (normalize_parameters(super) || {}) end alias :request_parameters :POST |