From 436da684dc3e85c4251d6e586913b8520add8638 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 17 Dec 2007 00:10:18 +0000 Subject: Allow headers[Accept] to be set by hand when calling xml_http_request (closes #10461) [BMorearty] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8426 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/integration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb index 18050ae903..75e6796dc9 100644 --- a/actionpack/lib/action_controller/integration.rb +++ b/actionpack/lib/action_controller/integration.rb @@ -187,7 +187,7 @@ module ActionController def xml_http_request(request_method, path, parameters = nil, headers = nil) headers ||= {} headers['X-Requested-With'] = 'XMLHttpRequest' - headers['Accept'] = 'text/javascript, text/html, application/xml, text/xml, */*' + headers['Accept'] ||= 'text/javascript, text/html, application/xml, text/xml, */*' process(request_method, path, parameters, headers) end -- cgit v1.2.3