File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 11 -*- coding: utf-8 -*-
22Changes with Apache 2.4.63
33
4+ *) mod_rewrite: Don't require [UNC] flag to preserve a leading //
5+ added by applying the perdir prefix to the substitution.
6+ [Ruediger Pluem, Eric Covener]
7+
48 *) Windows: Restore the ability to "Include" configuration files on UNC
59 paths. PR69313 [Eric Covener]
610
Original file line number Diff line number Diff line change @@ -4322,6 +4322,7 @@ static rule_return_type apply_rewrite_rule(rewriterule_entry *p,
43224322 char * newuri = NULL ;
43234323 request_rec * r = ctx -> r ;
43244324 int is_proxyreq = 0 ;
4325+ int prefix_added = 0 ;
43254326
43264327 ctx -> uri = r -> filename ;
43274328
@@ -4483,6 +4484,7 @@ static rule_return_type apply_rewrite_rule(rewriterule_entry *p,
44834484 newuri , ctx -> perdir , newuri );
44844485
44854486 newuri = apr_pstrcat (r -> pool , ctx -> perdir , newuri , NULL );
4487+ prefix_added = 1 ;
44864488 }
44874489 else if (!(p -> flags & (RULEFLAG_PROXY | RULEFLAG_FORCEREDIRECT ))) {
44884490 /* Not an absolute URI-path and the scheme (if any) is unknown,
@@ -4496,6 +4498,7 @@ static rule_return_type apply_rewrite_rule(rewriterule_entry *p,
44964498 newuri , newuri );
44974499
44984500 newuri = apr_pstrcat (r -> pool , "/" , newuri , NULL );
4501+ prefix_added = 1 ;
44994502 }
45004503 }
45014504
@@ -4576,7 +4579,7 @@ static rule_return_type apply_rewrite_rule(rewriterule_entry *p,
45764579 return RULE_RC_MATCH ;
45774580 }
45784581
4579- if (!(p -> flags & RULEFLAG_UNC )) {
4582+ if (!(( p -> flags & RULEFLAG_UNC ) || prefix_added )) {
45804583 /* merge leading slashes, unless they were literals in the sub */
45814584 if (!AP_IS_SLASH (p -> output [0 ]) || !AP_IS_SLASH (p -> output [1 ])) {
45824585 while (AP_IS_SLASH (r -> filename [0 ]) &&
You can’t perform that action at this time.
0 commit comments