Permalink
Browse files

Strip out trailing &_= for raw post bodies #2868

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3137 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 6329724 commit 743fb60a8a9f7689dfc62d067bb3eb456a335cf4 @sstephenson sstephenson committed Nov 21, 2005
Showing with 3 additions and 0 deletions.
  1. +2 −0 actionpack/CHANGELOG
  2. +1 −0 actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb
View
@@ -1,5 +1,7 @@
*SVN*
+* Strip out trailing &_= for raw post bodies. Closes #2868. [Sam Stephenson]
+
* Correct docs for automatic layout assignment. #2610. [Charles M. Gerungan]
* Update to Prototype 1.4.0_rc4. Closes #2943 (old Array.prototype.reverse behavior can be obtained by passing false as an argument). [Sam Stephenson]
@@ -54,6 +54,7 @@ def read_params_from_post
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

0 comments on commit 743fb60

Please sign in to comment.