diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-16 06:42:49 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-06-16 06:42:49 +0000 |
commit | a895be0259eb2e47fab8de3c8d30c700a304d441 (patch) | |
tree | 04eb7c191bb71610f357fd7784e5f8447e2c0355 /actionpack/lib/action_controller/cgi_ext | |
parent | a7a1c4e2cdaebf1e00b11ae885992dde5b708f98 (diff) | |
download | rails-a895be0259eb2e47fab8de3c8d30c700a304d441.tar.gz rails-a895be0259eb2e47fab8de3c8d30c700a304d441.tar.bz2 rails-a895be0259eb2e47fab8de3c8d30c700a304d441.zip |
Fixed query parser to deal gracefully with equal signs inside keys and values #1345 [gorou]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1441 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/cgi_ext')
-rwxr-xr-x | actionpack/lib/action_controller/cgi_ext/cgi_methods.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb b/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb index 59439cf8e5..dc1b1189b5 100755 --- a/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb +++ b/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb @@ -11,7 +11,8 @@ class CGIMethods #:nodoc: parsed_params = {} query_string.split(/[&;]/).each { |p| - k, v = p.split('=') + k, v = p.split('=',2) + v = nil if (!v.nil? && v.empty?) k = CGI.unescape(k) unless k.nil? v = CGI.unescape(v) unless v.nil? |