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

Changeset 4892

Show
Ignore:
Timestamp:
09/01/06 02:25:29 (2 years ago)
Author:
bitsweat
Message:

Integration tests: headers beginning with X aren't excluded from the HTTP_ prefix, so X-Requested-With becomes HTTP_X_REQUESTED_WITH as expected.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r4885 r4892  
    11*SVN* 
     2 
     3* Integration tests: headers beginning with X aren't excluded from the HTTP_ prefix, so X-Requested-With becomes HTTP_X_REQUESTED_WITH as expected. [Mike Clark] 
    24 
    35* Tighten rescue clauses.  #5985 [james@grayproductions.net] 
  • trunk/actionpack/lib/action_controller/integration.rb

    r4825 r4892  
    233233          (headers || {}).each do |key, value| 
    234234            key = key.to_s.upcase.gsub(/-/, "_") 
    235             key = "HTTP_#{key}" unless env.has_key?(key) || key =~ /^X|HTTP
     235            key = "HTTP_#{key}" unless env.has_key?(key) || key =~ /^HTTP_
    236236            env[key] = value 
    237237          end