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

Changeset 3924

Show
Ignore:
Timestamp:
03/18/06 15:09:27 (3 years ago)
Author:
minam
Message:

Add Integration::Session.accept for setting the HTTP Accept header to use (defaults to FF 1.5 value)

Files:

Legend:

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

    r3923 r3924  
    3131      # The remote_addr used in the last request. 
    3232      attr_accessor :remote_addr 
     33 
     34      # The Accept header to send. 
     35      attr_accessor :accept 
    3336 
    3437      # A map of the cookies returned by the last response, and which will be 
     
    6770        self.host        = "www.example.test" 
    6871        self.remote_addr = "127.0.0.1" 
     72        self.accept      = "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" 
    6973 
    7074        unless @named_routes_configured 
     
    210214            "CONTENT_LENGTH" => data ? data.length.to_s : nil, 
    211215            "HTTP_COOKIE"    => encode_cookies, 
    212             "HTTPS"          => https? ? "on" : "off" 
     216            "HTTPS"          => https? ? "on" : "off", 
     217            "HTTP_ACCEPT"    => accept 
    213218          ) 
    214219