Skip to content

Commit

Permalink
back to original patch in PR66672
Browse files Browse the repository at this point in the history
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
  • Loading branch information
covener committed Jun 28, 2023
1 parent 361ef0d commit 30afa46
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/mappers/mod_rewrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 30afa46

Please sign in to comment.