Fixed that host would choke when cgi.host returned nil #432 [Tobias Luetke]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@381 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson
2005-01-11 00:15:02 +00:00
parent a971dc5e4a
commit bcb8116796
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
*SVN*
* Fixed that host would choke when cgi.host returned nil #432 [Tobias Luetke]
* Added that form helpers now take an index option #448 [Tim Bates]
Example:

View File

@@ -61,7 +61,7 @@ module ActionController #:nodoc:
end
def host
env["HTTP_X_FORWARDED_HOST"] || @cgi.host.split(":").first
env["HTTP_X_FORWARDED_HOST"] || @cgi.host.to_s.split(":").first
end
def session