From 9fb5ee8beb2f19aa09ae388096e66b634297dc77 Mon Sep 17 00:00:00 2001 From: Overbryd Date: Mon, 5 Dec 2011 11:48:05 +0100 Subject: Minor enhancement by not unnecessarely escaping forward slashing within a curly regexp and by mentoining the protocol relative scheme in the internal comment --- actionpack/lib/action_controller/metal/redirecting.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller/metal/redirecting.rb') 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 -- cgit v1.2.3