Browse files

If RAW_POST_DATA was set explicitly, use that (closes #4281)

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3972 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 5f4f4b0 commit 8ea1fadcbeefeb1b7f4bc46c083b0c761cde41e3 @dhh dhh committed Mar 19, 2006
Showing with 10 additions and 6 deletions.
  1. +10 −6 actionpack/lib/action_controller/test_process.rb
View
16 actionpack/lib/action_controller/test_process.rb
@@ -43,13 +43,17 @@ def reset_session
end
def raw_post
- params = self.request_parameters.dup
- %w(controller action only_path).each do |k|
- params.delete(k)
- params.delete(k.to_sym)
- end
+ if raw_post = env['RAW_POST_DATA']
+ raw_post
+ else
+ params = self.request_parameters.dup
+ %w(controller action only_path).each do |k|
+ params.delete(k)
+ params.delete(k.to_sym)
+ end
- params.map { |k,v| [ CGI.escape(k.to_s), CGI.escape(v.to_s) ].join('=') }.sort.join('&')
+ params.map { |k,v| [ CGI.escape(k.to_s), CGI.escape(v.to_s) ].join('=') }.sort.join('&')
+ end
end
def port=(number)

0 comments on commit 8ea1fad

Please sign in to comment.