diff options
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 3faf510337..2674fe0680 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Strip out trailing &_= for raw post bodies. Closes #2868. [Sam Stephenson] + * Pass multiple arguments to Element.show and Element.hide in JavaScriptGenerator instead of using iterators. [Sam Stephenson] * Improve expire_fragment documentation. #2966 [court3nay@gmail.com] 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 bb8bf9c2de..3057dba1b5 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 @@ -54,6 +54,7 @@ class CGI #:nodoc: content = stdinput.read(Integer(env_table['CONTENT_LENGTH'])) || '' # fix for Safari Ajax postings that always append \000 content.chop! if content[-1] == 0 + content.gsub! /&_=$/, '' env_table['RAW_POST_DATA'] = content.freeze end |