Permalink
Browse files

Merge pull request #3858 from Overbryd/redirect_to_url_with_network_p…

…ath_reference

redirect_to url with network path reference: Do not escape forward slashes within a curly regexp
  • Loading branch information...
fxn committed Dec 5, 2011
2 parents 446bdb4 + 9fb5ee8 commit be482bd6d6d83aad6c281925e3a1c776bfa5e7cd
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 be482bd

Please sign in to comment.