aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/integration.rb6
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