]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
When using Redirect in directory context, append requested query
authorAndré Malo <nd@apache.org>
Thu, 24 Apr 2003 16:08:21 +0000 (16:08 +0000)
committerAndré Malo <nd@apache.org>
Thu, 24 Apr 2003 16:08:21 +0000 (16:08 +0000)
string if there's no one supplied by configuration.

PR: 10961
Reviewed by: Jeff Trawick, Jim Jagielski

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

src/CHANGES
src/modules/standard/mod_alias.c

index e0831ae47e02490f28dbac1f38d8181e1c9098fc..3c6816a972e673b7cb8ec9ae2fe64f6e006d52ae 100644 (file)
@@ -1,5 +1,9 @@
 Changes with Apache 1.3.28
 
+  *) When using Redirect in directory context, append requested query
+     string if there's no one supplied by configuration. PR 10961.
+     [André Malo]
+
   *) Fix path handling of mod_rewrite, especially on non-unix systems.
      There was some confusion between local paths and URL paths.
      PR 12902.  [André Malo]
index 98b148dc7cfe439d8e8f21cf79bd43509beef47e..78e7b17fb3ef8cad2cbfac0643def8cc40eabb65 100644 (file)
@@ -411,6 +411,12 @@ static int fixup_redir(request_rec *r)
                               r->uri, ret);
             }
             else {
+                /* append requested query only, if the config didn't
+                 * supply its own.
+                 */
+                if (r->args && !strchr(ret, '?')) {
+                    ret = ap_pstrcat(r->pool, ret, "?", r->args, NULL);
+                }
                 ap_table_setn(r->headers_out, "Location", ret);
             }
         }