1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Minor enhancement by not unnecessarely escaping forward slashing within a curly regexp and by mentoining the protocol relative scheme in the internal comment

This commit is contained in:
Overbryd 2011-12-05 11:48:05 +01:00
parent e31c4ace97
commit 9fb5ee8beb

View file

@ -81,7 +81,8 @@ module ActionController
# The scheme name consist of a letter followed by any combination of # The scheme name consist of a letter followed by any combination of
# letters, digits, and the plus ("+"), period ("."), or hyphen ("-") # letters, digits, and the plus ("+"), period ("."), or hyphen ("-")
# characters; and is terminated by a colon (":"). # 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 options
when String when String
request.protocol + request.host_with_port + options request.protocol + request.host_with_port + options