Skip to content

Commit

Permalink
If RAW_POST_DATA was set explicitly, use that (closes #4281)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3972 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Mar 19, 2006
1 parent 5f4f4b0 commit 8ea1fad
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions actionpack/lib/action_controller/test_process.rb
Expand Up @@ -43,13 +43,17 @@ def reset_session
end end


def raw_post def raw_post
params = self.request_parameters.dup if raw_post = env['RAW_POST_DATA']
%w(controller action only_path).each do |k| raw_post
params.delete(k) else
params.delete(k.to_sym) params = self.request_parameters.dup
end %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 end


def port=(number) def port=(number)
Expand Down

0 comments on commit 8ea1fad

Please sign in to comment.