aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-06-30 05:19:15 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-06-30 05:19:15 +0000
commitbdac94e990162d711529922cf32adca2f0836905 (patch)
tree33be4fcd61bfc0a53c1988b0b2189108e4c65aea /actionpack
parent6a1a1e55364168a2de981fdd3aae83d9614b72e2 (diff)
downloadrails-bdac94e990162d711529922cf32adca2f0836905.tar.gz
rails-bdac94e990162d711529922cf32adca2f0836905.tar.bz2
rails-bdac94e990162d711529922cf32adca2f0836905.zip
Fixed proper form-encoded parameter parsing for requests with "Content-Type: application/x-www-form-urlencoded; charset=utf-8" (note the presence of a charset directive) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4522 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 4a63ba47d7..8ae50f09be 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed proper form-encoded parameter parsing for requests with "Content-Type: application/x-www-form-urlencoded; charset=utf-8" (note the presence of a charset directive) [DHH]
+
* Add route_name_path method to generate only the path for a named routes. For example, map.person will add person_path. [Nicholas Seckar]
* Avoid naming collision among compiled view methods. [Jeremy Kemper]
diff --git a/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb b/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb
index 1204c57f00..1b275501cb 100644
--- a/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb
+++ b/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb
@@ -36,7 +36,7 @@ class CGI #:nodoc:
if boundary = extract_multipart_form_boundary(content_type)
@multipart = true
@params = read_multipart(boundary, content_length)
- elsif content_type.blank? || content_type.downcase != 'application/x-www-form-urlencoded'
+ elsif content_type.blank? || content_type.downcase !~ %r{^application/x-www-form-urlencoded.*}
read_params(method, content_length)
@params = {}
end