From: André Malo Date: Thu, 24 Apr 2003 16:16:22 +0000 (+0000) Subject: When using Redirect in directory context, append requested query X-Git-Tag: 2.0.46~192 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=259be8c35c5a20118282fef9158eac134006c4ca;p=thirdparty%2Fapache%2Fhttpd.git When using Redirect in directory context, append requested query 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/APACHE_2_0_BRANCH@99581 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 637265344fb..fb3f0a945de 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.46 + *) When using Redirect in directory context, append requested query + string if there's no one supplied by configuration. PR 10961. + [André Malo] + *) Unescape the supplied wildcard pattern in mod_autoindex. Otherwise the pattern will not always match as desired. PR 12596. [André Malo] diff --git a/STATUS b/STATUS index 01fd04c1dd8..cc80a88407f 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2003/04/24 15:38:41 $] +Last modified at [$Date: 2003/04/24 16:16:19 $] Release: @@ -136,13 +136,6 @@ PATCHES TO PORT FROM 2.1 modules/mappers/mod_rewrite.c: r1.146 +1: nd - * When using Redirect in directory context, append requested query - string if there's no one supplied by configuration. PR 10961. - (2.0 + 1.3) - modules/mappers/mod_alias.c: r1.49 - +1: nd, trawick (this is simple... look how query string is - appended in the other situation), jim - * mod_negotiation: parse quality values independent from the current locale and level values as integers. PR 17564. (essentially: get a rid of atof()) (2.0 + 1.3) diff --git a/modules/mappers/mod_alias.c b/modules/mappers/mod_alias.c index 3e21d6f0d63..b5bea281c05 100644 --- a/modules/mappers/mod_alias.c +++ b/modules/mappers/mod_alias.c @@ -463,6 +463,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); } }