diff options
-rw-r--r-- | actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/raw_post_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
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 1b275501cb..4be69548fd 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 !~ %r{^application/x-www-form-urlencoded.*} + elsif content_type.blank? || content_type !~ %r{application/x-www-form-urlencoded}i read_params(method, content_length) @params = {} end diff --git a/actionpack/test/controller/raw_post_test.rb b/actionpack/test/controller/raw_post_test.rb index b6895bc3cc..c9816484b7 100644 --- a/actionpack/test/controller/raw_post_test.rb +++ b/actionpack/test/controller/raw_post_test.rb @@ -11,7 +11,7 @@ class RawPostDataTest < Test::Unit::TestCase def test_post_with_urlencoded_body ENV['REQUEST_METHOD'] = 'POST' - ENV['CONTENT_TYPE'] = 'application/x-www-form-urlencoded' + ENV['CONTENT_TYPE'] = ' apPlication/x-Www-form-urlEncoded; charset=utf-8' assert_equal ['1'], cgi_params['a'] assert_has_raw_post_data end |