You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by bu...@apache.org on 2021/04/13 00:26:28 UTC

[Bug 65073] 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 <ca...@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