aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/integration_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/integration_test.rb b/actionpack/lib/action_controller/integration_test.rb
index 35fec04dd3..088992e13f 100644
--- a/actionpack/lib/action_controller/integration_test.rb
+++ b/actionpack/lib/action_controller/integration_test.rb
@@ -93,6 +93,10 @@ module ActionController
@host
end
+ # To make setting the host more natural when using a session object
+ # directly: foo.host = "blah"
+ alias_method :host=, :host!
+
# Follow a single redirect response. If the last response was not a
# redirect, an exception will be raised. Otherwise, the redirect is
# performed on the location header.
@@ -173,7 +177,7 @@ module ActionController
def interpret_uri(path)
location = URI.parse(path)
https! URI::HTTPS === location
- host! location.host
+ host! location.host if location.host
location.query ? "#{location.path}?#{location.query}" : location.path
end