]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_alias: Accept path components (URL part) in Redirects. PR 35314.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 18 May 2007 06:00:10 +0000 (06:00 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 18 May 2007 06:00:10 +0000 (06:00 +0000)
(Backport of r490142)

Reviewed by: niq, jim, wrowe

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@539273 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/mappers/mod_alias.c

diff --git a/CHANGES b/CHANGES
index e97077ffeed3ed4613d2f7790fab2504f13ef9ae..001e956c246371e79238c61c086d33626065803f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.5
 
+  *) mod_alias: Accept path components (URL part) in Redirects.  PR 35314.
+     [Nick Kew]
+
   *) mod_headers: Allow % at the end of a Header value.  PR 36609.
      [Nick Kew, Ruediger Pluem]
 
index b0a2517700c5bf40945899e0c71eef62ac0138ff..bde1703de7d01892d9e2b12404ba7a8c6209ed57 100644 (file)
@@ -204,7 +204,10 @@ static const char *add_redirect_internal(cmd_parms *cmd,
     if (ap_is_HTTP_REDIRECT(status)) {
         if (!url)
             return "URL to redirect to is missing";
-        if (!use_regex && !ap_is_url(url))
+        /* PR#35314: we can allow path components here;
+         * they get correctly resolved to full URLs.
+         */
+        if (!use_regex && !ap_is_url(url) && (url[0] != '/'))
             return "Redirect to non-URL";
     }
     else {