Permalink
Browse files

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
  • Loading branch information...
1 parent b5521a2 commit 9c99be88b2806600f768b74bcfff1bc93de8c5ef @jeremy jeremy committed Sep 1, 2006
Showing with 3 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +1 −1 actionpack/lib/action_controller/integration.rb
View
@@ -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]
@@ -232,7 +232,7 @@ def process(method, path, parameters=nil, headers=nil)
(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

0 comments on commit 9c99be8

Please sign in to comment.