Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4633

Show
Ignore:
Timestamp:
07/31/06 06:18:20 (2 years ago)
Author:
david
Message:

Fixed that integration simulation of XHRs should set Accept header as well [Edward Frederick]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/integration.rb

    r4624 r4633  
    168168      # prefix 'HTTP_' added if needed. 
    169169      def xml_http_request(path, parameters=nil, headers=nil) 
    170         headers = (headers || {}).merge("X-Requested-With" => "XMLHttpRequest") 
     170        headers = (headers || {}).merge( 
     171          "X-Requested-With" => "XMLHttpRequest" 
     172          "Accept"           => "text/javascript, text/html, application/xml, text/xml, */*" 
     173        ) 
     174 
    171175        post(path, parameters, headers) 
    172176      end