aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOverbryd <l.rieder@gmail.com>2011-12-05 11:48:05 +0100
committerOverbryd <l.rieder@gmail.com>2011-12-05 11:48:05 +0100
commit9fb5ee8beb2f19aa09ae388096e66b634297dc77 (patch)
tree207dfb6a559757d02499c71ca9018e4cb07bc850
parente31c4ace97638d186aae389dd2cbe3b5786beb57 (diff)
downloadrails-9fb5ee8beb2f19aa09ae388096e66b634297dc77.tar.gz
rails-9fb5ee8beb2f19aa09ae388096e66b634297dc77.tar.bz2
rails-9fb5ee8beb2f19aa09ae388096e66b634297dc77.zip
Minor enhancement by not unnecessarely escaping forward slashing within a curly regexp and by mentoining the protocol relative scheme in the internal comment
-rw-r--r--actionpack/lib/action_controller/metal/redirecting.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb
index 7d14b175cc..b07742e0e1 100644
--- a/actionpack/lib/action_controller/metal/redirecting.rb
+++ b/actionpack/lib/action_controller/metal/redirecting.rb
@@ -81,7 +81,8 @@ module ActionController
# The scheme name consist of a letter followed by any combination of
# letters, digits, and the plus ("+"), period ("."), or hyphen ("-")
# characters; and is terminated by a colon (":").
- when %r{^(\w[\w+.-]*:|\/\/).*}
+ # The protocol relative scheme starts with a double slash "//"
+ when %r{^(\w[\w+.-]*:|//).*}
options
when String
request.protocol + request.host_with_port + options