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

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4892 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper
2006-09-01 02:25:29 +00:00
parent b5521a2651
commit 9c99be88b2
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
*SVN*
* 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]
* Tighten rescue clauses. #5985 [james@grayproductions.net]
* Fix send_data documentation typo. #5982 [brad@madriska.com]

View File

@@ -232,7 +232,7 @@ module ActionController
(headers || {}).each do |key, value|
key = key.to_s.upcase.gsub(/-/, "_")
key = "HTTP_#{key}" unless env.has_key?(key) || key =~ /^X|HTTP/
key = "HTTP_#{key}" unless env.has_key?(key) || key =~ /^HTTP_/
env[key] = value
end