From: Andre Malo Date: Tue, 25 Feb 2003 22:59:58 +0000 (+0000) Subject: When using Redirect in directory context, append requested query X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b747597da0333171de45494db85de0c74fab6bea;p=apache When using Redirect in directory context, append requested query 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 --- diff --git a/CHANGES b/CHANGES index d801625caf..314e401eed 100644 --- 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] diff --git a/modules/mappers/mod_alias.c b/modules/mappers/mod_alias.c index 65388807b2..9ceb4ad02f 100644 --- a/modules/mappers/mod_alias.c +++ b/modules/mappers/mod_alias.c @@ -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); } }