<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,7 @@
 *2.2.1 [RC2 or 2.2 final]*
 
+* Fixed regex in redirect_to to fully support URI schemes #1247 [Seth Fitzsimmons]
+
 * Fixed bug with asset timestamping when using relative_url_root #1265 [Joe Goldwasser]
 
 </diff>
      <filename>actionpack/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -1053,7 +1053,10 @@ module ActionController #:nodoc:
         logger.info(&quot;Redirected to #{options}&quot;) if logger &amp;&amp; logger.info?
 
         case options
-          when %r{^\w+://.*}
+          # The scheme name consist of a letter followed by any combination of
+          # letters, digits, and the plus (&quot;+&quot;), period (&quot;.&quot;), or hyphen (&quot;-&quot;)
+          # characters; and is terminated by a colon (&quot;:&quot;).
+          when %r{^\w[\w\d+.-]*:.*}
             redirect_to_full_url(options, status)
           when String
             redirect_to_full_url(request.protocol + request.host_with_port + options, status)</diff>
      <filename>actionpack/lib/action_controller/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -73,6 +73,10 @@ class RedirectController &lt; ActionController::Base
     redirect_to &quot;http://dev.rubyonrails.org/query?status=new&quot;
   end
 
+  def redirect_to_url_with_complex_scheme
+    redirect_to &quot;x-test+scheme.complex:redirect&quot;
+  end
+
   def redirect_to_back
     redirect_to :back
   end
@@ -198,6 +202,12 @@ class RedirectTest &lt; Test::Unit::TestCase
     assert_redirected_to &quot;http://dev.rubyonrails.org/query?status=new&quot;
   end
 
+  def test_redirect_to_url_with_complex_scheme
+    get :redirect_to_url_with_complex_scheme
+    assert_response :redirect
+    assert_equal &quot;x-test+scheme.complex:redirect&quot;, redirect_to_url
+  end
+
   def test_redirect_to_back
     @request.env[&quot;HTTP_REFERER&quot;] = &quot;http://www.example.com/coming/from&quot;
     get :redirect_to_back</diff>
      <filename>actionpack/test/controller/redirect_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ef53d915164da7f757d03c4a70fe38e374c08b14</id>
    </parent>
  </parents>
  <author>
    <name>Seth Fitzsimmons</name>
    <email>seth@mojodna.net</email>
  </author>
  <url>http://github.com/rails/rails/commit/47b4fa4a621ee48ab17545b1e9fb38efef53b28e</url>
  <id>47b4fa4a621ee48ab17545b1e9fb38efef53b28e</id>
  <committed-date>2008-10-30T13:07:50-07:00</committed-date>
  <authored-date>2008-10-30T12:03:47-07:00</authored-date>
  <message>Fixed regex in redirect_to to fully support URI schemes [#1247 state:committed]

Signed-off-by: David Heinemeier Hansson &lt;david@loudthinking.com&gt;</message>
  <tree>2cf5c92154ff0cdefb4b09e16cb788802369cb4b</tree>
  <committer>
    <name>David Heinemeier Hansson</name>
    <email>david@loudthinking.com</email>
  </committer>
</commit>
