Changeset 8426
- Timestamp:
- 12/17/07 00:10:18 (9 months ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/integration.rb (modified) (1 diff)
- trunk/actionpack/test/controller/integration_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r8425 r8426 1 1 *2.0.2* (December 16th, 2007) 2 3 * Allow headers['Accept'] to be set by hand when calling xml_http_request #10461 [BMorearty] 2 4 3 5 * Added OPTIONS to list of default accepted HTTP methods #10449 [holoway] trunk/actionpack/lib/action_controller/integration.rb
r8168 r8426 188 188 headers ||= {} 189 189 headers['X-Requested-With'] = 'XMLHttpRequest' 190 headers['Accept'] = 'text/javascript, text/html, application/xml, text/xml, */*'190 headers['Accept'] ||= 'text/javascript, text/html, application/xml, text/xml, */*' 191 191 192 192 process(request_method, path, parameters, headers) trunk/actionpack/test/controller/integration_test.rb
r8047 r8426 180 180 @session.xml_http_request(:head,path,params,headers) 181 181 end 182 183 def test_xml_http_request_override_accept 184 path = "/index"; params = "blah"; headers = {:location => 'blah', "Accept" => "application/xml"} 185 headers_after_xhr = headers.merge( 186 "X-Requested-With" => "XMLHttpRequest" 187 ) 188 @session.expects(:process).with(:post,path,params,headers_after_xhr) 189 @session.xml_http_request(:post,path,params,headers) 190 end 182 191 end 183 192