@marcel91200 / caddy Mirror · read-only / commits / a1081194
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 11, 14:45 UTC

Merge commit from fork

Necessary as otherwise the early-bail in `until = strings.IndexByte(remaining, nextCh) ... if until == -1` can cause a case-insensitive mismatch Co-authored-by: Asim Viladi Oglu Manizada <manizada@users.noreply.github.com>

Matt Holt committed Feb 20, 2026 at 10:54 UTC a1081194bfae4e0d8c227ec44aecb95eded55d1e
2 files changed +6
modules/caddyhttp/matchers.go
+1
@@ -538,6 +538,7 @@ func (m MatchPath) MatchWithError(r *http.Request) (bool, error) {
538 }
539
540 func (MatchPath) matchPatternWithEscapeSequence(escapedPath, matchPath string) bool {
541 + escapedPath = strings.ToLower(escapedPath)
542 // We would just compare the pattern against r.URL.Path,
543 // but the pattern contains %, indicating that we should
544 // compare at least some part of the path in raw/escaped
modules/caddyhttp/matchers_test.go
+5
@@ -417,6 +417,11 @@ func TestPathMatcher(t *testing.T) {
417 input: "/ADMIN%2fpanel",
418 expect: true,
419 },
420 + {
421 + match: MatchPath{"/admin%2fpa*el"},
422 + input: "/ADMIN%2fPaAzZLm123NEL",
423 + expect: true,
424 + },
425 } {
426 err := tc.match.Provision(caddy.Context{})
427 if err == nil && tc.provisionErr {