mod_rewrite: Fix a recent regression where a rule with both a trailing
'?' and the [QSA] flag did not have the query appended. PR66672
Submitted By: Frank Meier <frank.meier ergon.ch>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1910633 13f79535-47bb-0310-9956-
ffa450edef68
--- /dev/null
+ *) mod_rewrite: Fix a recent regression where a rule with both a trailing
+ '?' and the [QSA] flag did not have the query appended. PR66672
+ Frank Meier <frank.meier ergon.ch>
}
if (*(a2_end-1) == '?') {
- /* a literal ? at the end of the unsubstituted rewrite rule */
- newrule->flags |= RULEFLAG_QSNONE;
*(a2_end-1) = '\0'; /* trailing ? has done its job */
+ /* a literal ? at the end of the unsubstituted rewrite rule */
+ if (!(newrule->flags & RULEFLAG_QSAPPEND))
+ {
+ newrule->flags |= RULEFLAG_QSNONE;
+ }
}
else if (newrule->flags & RULEFLAG_QSDISCARD) {
if (NULL == ap_strchr(newrule->output, '?')) {