https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/348.diff
Submitted by: covener
Reviewed by: covener, ylavic, rpluem
Github: closes #348
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1908859 13f79535-47bb-0310-9956-
ffa450edef68
--- /dev/null
+ *) mod_rewrite: Fix a 2.4.56 regression for substitutions ending
+ in a question mark. PR66547. [Eric Covener]
+
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 */
}
else if (newrule->flags & RULEFLAG_QSDISCARD) {
if (NULL == ap_strchr(newrule->output, '?')) {