]> granicus.if.org Git - apache/commitdiff
When using Redirect in directory context, append requested query
authorAndre Malo <nd@apache.org>
Tue, 25 Feb 2003 22:59:58 +0000 (22:59 +0000)
committerAndre Malo <nd@apache.org>
Tue, 25 Feb 2003 22:59:58 +0000 (22:59 +0000)
string if there's no one supplied by configuration.

PR: 10961

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98796 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/mappers/mod_alias.c

diff --git a/CHANGES b/CHANGES
index d801625caf8fd7b1be1f84977c2ba2037e46b65f..314e401eedb8de79125c067956a733a977c532b0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) 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 65388807b216860beb8f936f1adf229fa3a14b44..9ceb4ad02f8544f30d76f738474d0201e92f9a9d 100644 (file)
@@ -489,6 +489,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 && !ap_strchr(ret, '?')) {
+                    ret = apr_pstrcat(r->pool, ret, "?", r->args, NULL);
+                }
                 apr_table_setn(r->headers_out, "Location", ret);
             }
         }