From ede2a222ee9412f1f6e671470edc3c18449bbe45 Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Mon, 21 Nov 2005 08:04:28 +0000 Subject: Strip out trailing &_= for raw post bodies #2868 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3137 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_controller/cgi_ext') 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 -- cgit v1.2.3