From: Eric Covener Date: Wed, 28 Jun 2023 12:37:50 +0000 (+0000) Subject: back to original patch in PR66672 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30afa469e95f59c57f956981a6381b32b749fcc2;p=thirdparty%2Fapache%2Fhttpd.git back to original patch in PR66672 Since QSNONE will skip splitoutqueryargs, it's where we should fixup the trailing ? git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910662 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 7fb4e92c0de..47f575b2586 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -3909,10 +3909,12 @@ static const char *cmd_rewriterule(cmd_parms *cmd, void *in_dconf, } if (*(a2_end-1) == '?') { - *(a2_end-1) = '\0'; /* trailing ? has done its job */ /* a literal ? at the end of the unsubstituted rewrite rule */ - if (!(newrule->flags & RULEFLAG_QSAPPEND)) - { + if (!(newrule->flags & RULEFLAG_QSAPPEND)) { + /* trailing ? has done its job. with QSA, splitoutqueryargs + * will handle it + */ + *(a2_end-1) = '\0'; newrule->flags |= RULEFLAG_QSNONE; } }