diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-07-31 06:18:20 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-07-31 06:18:20 +0000 |
commit | df7efd7e211f61a3954936f119075cc5e20e4521 (patch) | |
tree | 01715c4c9bed095629187e96b5a25576468d9a12 | |
parent | 2b3cc2478fff77fdada9adeabc32ecea0605d7bd (diff) | |
download | rails-df7efd7e211f61a3954936f119075cc5e20e4521.tar.gz rails-df7efd7e211f61a3954936f119075cc5e20e4521.tar.bz2 rails-df7efd7e211f61a3954936f119075cc5e20e4521.zip |
Fixed that integration simulation of XHRs should set Accept header as well [Edward Frederick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4633 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/lib/action_controller/integration.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb index d988731531..cc16f69020 100644 --- a/actionpack/lib/action_controller/integration.rb +++ b/actionpack/lib/action_controller/integration.rb @@ -167,7 +167,11 @@ module ActionController # should be a hash. The keys will automatically be upcased, with the # prefix 'HTTP_' added if needed. def xml_http_request(path, parameters=nil, headers=nil) - headers = (headers || {}).merge("X-Requested-With" => "XMLHttpRequest") + headers = (headers || {}).merge( + "X-Requested-With" => "XMLHttpRequest" + "Accept" => "text/javascript, text/html, application/xml, text/xml, */*" + ) + post(path, parameters, headers) end |