Mailing List Archive

[Bug 65073] <LocationMatch> claims consecutive slashes were not matched, while MergeSlashes claims the opposite
https://bz.apache.org/bugzilla/show_bug.cgi?id=65073

--- Comment #1 from Christoph Anton Mitterer <calestyo@scientia.net> ---
Some testing reveals that apparently the documentation of
Location/LocationMatch is wrong, and slashes are indeed merged as claimed by
MergeSlashes.

1) with: MergeSlashes On
<LocationMatch "^/xx//yy$">
request to "/xx/yy" => no match
request to "/xx//yy" => no match

<LocationMatch "^/xx/yy$">
request to "/xx/yy" => match
request to "/xx//yy" => match

<Location "/xx//yy">
request to "/xx/yy" => no match
request to "/xx//yy" => no match

<Location "/xx/yy">
request to "/xx/yy" => match
request to "/xx//yy" => match


2) with: MergeSlashes Off
<LocationMatch "^/xx//yy$">
request to "/xx/yy" => no match
request to "/xx//yy" => match

<LocationMatch "^/xx/yy$">
request to "/xx/yy" => match
request to "/xx//yy" => no match

<Location "/xx//yy">
request to "/xx/yy" => no match
request to "/xx//yy" => match

<Location "/xx/yy">
request to "/xx/yy" => match
request to "/xx//yy" => no match


In principle these are the results one would expect, BUT.

a) the Location/LocationMatch documentation never exactly tells what is
actually folded, the / of the request or of the pattern... so strictly
speaking, the documentation is ambiguous and if a use assume it would fold it
from the pattern he wouldn't understand the results.

b) That (non-regex) <Location> can have multiple consecutive / is not really
explained either...
The
"But when (non-regex) <Location> is used for non-proxy requests it will
implicitly match multiple slashes with a single slash."
is anyway wrong, as it actually depends on MergeSlashes, which is not mentioned
there.
But even then it's not directly clear that <Location "/xx//yy"> (which
conceptually makes not that much sense for non-regex) really matches literally
and requires //.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
[Bug 65073] <LocationMatch> claims consecutive slashes were not matched, while MergeSlashes claims the opposite [ In reply to ]
https://bz.apache.org/bugzilla/show_bug.cgi?id=65073

--- Comment #2 from Christoph Anton Mitterer <calestyo@scientia.net> ---
Oh and I just realised that MergeSlashes' documentation is also wrong.

It says:
" In these cases MergeSlashes can be set to OFF to retain the multiple
consecutive slashes. In these configurations, regular expressions used in the
configuration file that match the path component of the URL (LocationMatch,
RewriteRule, ...) need to take into account multiple consecutive slashes."

But actually, both On AND Off need to be taken into account... AND not just for
regex-versions but apparently also for (non-regex) <Location>.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org