diff options
author | Xavier Noria <fxn@hashref.com> | 2010-08-20 17:18:57 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-08-20 17:18:57 +0200 |
commit | 0c75ec51a9b60252125534b8f9a3f6406713a957 (patch) | |
tree | 34165e93f7dd01157f77e4e70a46ec6a5bed77c8 /actionpack/lib/action_dispatch/http/url.rb | |
parent | 87398e531d0bb23b30787fe26d86678dba322895 (diff) | |
parent | 2ffa50f5a9fac08e08869687006031b70322497a (diff) | |
download | rails-0c75ec51a9b60252125534b8f9a3f6406713a957.tar.gz rails-0c75ec51a9b60252125534b8f9a3f6406713a957.tar.bz2 rails-0c75ec51a9b60252125534b8f9a3f6406713a957.zip |
Merge remote branch 'rails/master'
Diffstat (limited to 'actionpack/lib/action_dispatch/http/url.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/http/url.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb index b64a83c62e..ffb7bdd586 100644 --- a/actionpack/lib/action_dispatch/http/url.rb +++ b/actionpack/lib/action_dispatch/http/url.rb @@ -6,6 +6,11 @@ module ActionDispatch protocol + host_with_port + fullpath end + # Returns 'https' if this is an SSL request and 'http' otherwise. + def scheme + ssl? ? 'https' : 'http' + end + # Returns 'https://' if this is an SSL request and 'http://' otherwise. def protocol ssl? ? 'https://' : 'http://' @@ -53,6 +58,11 @@ module ActionDispatch end end + # Returns whether this request is using the standard port + def standard_port? + port == standard_port + end + # Returns a \port suffix like ":8080" if the \port number of this request # is not the default HTTP \port 80 or HTTPS \port 443. def port_string |