aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/redirecting.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-12-05 02:55:08 -0800
committerXavier Noria <fxn@hashref.com>2011-12-05 02:55:08 -0800
commitbe482bd6d6d83aad6c281925e3a1c776bfa5e7cd (patch)
tree207dfb6a559757d02499c71ca9018e4cb07bc850 /actionpack/lib/action_controller/metal/redirecting.rb
parent446bdb449d47d5608a98b297d4f76c783e996b34 (diff)
parent9fb5ee8beb2f19aa09ae388096e66b634297dc77 (diff)
downloadrails-be482bd6d6d83aad6c281925e3a1c776bfa5e7cd.tar.gz
rails-be482bd6d6d83aad6c281925e3a1c776bfa5e7cd.tar.bz2
rails-be482bd6d6d83aad6c281925e3a1c776bfa5e7cd.zip
Merge pull request #3858 from Overbryd/redirect_to_url_with_network_path_reference
redirect_to url with network path reference: Do not escape forward slashes within a curly regexp
Diffstat (limited to 'actionpack/lib/action_controller/metal/redirecting.rb')
-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