Skip to content

Commit

Permalink
Integration tests: headers beginning with X aren't excluded from the …
Browse files Browse the repository at this point in the history
…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
jeremy committed Sep 1, 2006
1 parent b5521a2 commit 9c99be8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9c99be8

Please sign in to comment.