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

Changeset 5634

Show
Ignore:
Timestamp:
11/26/06 05:04:57 (2 years ago)
Author:
david
Message:

Fix that redirects should set "Location" header, not "location", and remove dead CGI.redirect

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1-2-pre-release/actionpack/lib/action_controller/cgi_ext/cgi_ext.rb

    r1303 r5634  
    2828    CGIMethods.parse_request_parameters(params, env_table) 
    2929  end 
    30  
    31   def redirect(where) 
    32      header({  
    33        "Status" => "302 Moved",  
    34        "location" => "#{where}" 
    35     }) 
    36   end 
    3730   
    3831  def session(parameters = nil) 
  • branches/1-2-pre-release/actionpack/lib/action_controller/response.rb

    r5129 r5634  
    2828    def redirect(to_url, permanently = false) 
    2929      @headers["Status"]   = "302 Found" unless @headers["Status"] == "301 Moved Permanently" 
    30       @headers["location"] = to_url 
     30      @headers["Location"] = to_url 
    3131 
    3232      @body = "<html><body>You are being <a href=\"#{to_url}\">redirected</a>.</body></html>" 
  • trunk/actionpack/lib/action_controller/cgi_ext/cgi_ext.rb

    r1303 r5634  
    2828    CGIMethods.parse_request_parameters(params, env_table) 
    2929  end 
    30  
    31   def redirect(where) 
    32      header({  
    33        "Status" => "302 Moved",  
    34        "location" => "#{where}" 
    35     }) 
    36   end 
    3730   
    3831  def session(parameters = nil) 
  • trunk/actionpack/lib/action_controller/response.rb

    r5129 r5634  
    2828    def redirect(to_url, permanently = false) 
    2929      @headers["Status"]   = "302 Found" unless @headers["Status"] == "301 Moved Permanently" 
    30       @headers["location"] = to_url 
     30      @headers["Location"] = to_url 
    3131 
    3232      @body = "<html><body>You are being <a href=\"#{to_url}\">redirected</a>.</body></html>"