diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-14 18:35:31 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-14 18:35:31 +0000 |
commit | 7c042e09b43fa64492a54350aad691f6763809d8 (patch) | |
tree | e457fb25101f4161ba911289eec8cbb1c5d8ec98 | |
parent | 5e3364ef452d8b3d6e1b4eacfd9c8939be392c29 (diff) | |
download | rails-7c042e09b43fa64492a54350aad691f6763809d8.tar.gz rails-7c042e09b43fa64492a54350aad691f6763809d8.tar.bz2 rails-7c042e09b43fa64492a54350aad691f6763809d8.zip |
Fixed access to "Host" header with requests made by crappy old HTTP/1.0 clients #2124 [Marcel Molina]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2242 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/cgi_process.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 4302a2c085..a6ea1e9649 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed access to "Host" header with requests made by crappy old HTTP/1.0 clients #2124 [Marcel Molina] + * Added easy assignment of fragment cache store through use of symbols for included stores (old way still works too) Before: diff --git a/actionpack/lib/action_controller/cgi_process.rb b/actionpack/lib/action_controller/cgi_process.rb index d59de771c9..8c472c5514 100644 --- a/actionpack/lib/action_controller/cgi_process.rb +++ b/actionpack/lib/action_controller/cgi_process.rb @@ -79,7 +79,7 @@ module ActionController #:nodoc: end def host - env["HTTP_X_FORWARDED_HOST"] || @cgi.host.to_s.split(":").first + env["HTTP_X_FORWARDED_HOST"] || @cgi.host.to_s.split(":").first || '' end def session |