aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-09-01 02:25:29 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-09-01 02:25:29 +0000
commit9c99be88b2806600f768b74bcfff1bc93de8c5ef (patch)
treef907a83fa555a10b0b3501fbf7e7a37e9d132339 /actionpack
parentb5521a2651b5444f10c20803279af6d9570069b7 (diff)
downloadrails-9c99be88b2806600f768b74bcfff1bc93de8c5ef.tar.gz
rails-9c99be88b2806600f768b74bcfff1bc93de8c5ef.tar.bz2
rails-9c99be88b2806600f768b74bcfff1bc93de8c5ef.zip
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
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_controller/integration.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 362804d128..faf205df87 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -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]
diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb
index ff7944148c..545a39ac9a 100644
--- a/actionpack/lib/action_controller/integration.rb
+++ b/actionpack/lib/action_controller/integration.rb
@@ -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