Permalink
Browse files

Minor enhancement by not unnecessarely escaping forward slashing with…

…in a curly regexp and by mentoining the protocol relative scheme in the internal comment
  • Loading branch information...
1 parent e31c4ac commit 9fb5ee8beb2f19aa09ae388096e66b634297dc77 @Overbryd Overbryd committed Dec 5, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 actionpack/lib/action_controller/metal/redirecting.rb
@@ -81,7 +81,8 @@ def _compute_redirect_to_location(options)
# 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

0 comments on commit 9fb5ee8

Please sign in to comment.