caddy/caddyconfig
Bruno Teixeira Lopes 0e8eb41b87
httpcaddyfile: fix incorrect error message on duplicate matchers (#7780)
Parse each matcher segment individually using NewDispenser(segment) instead
of DispenseDirective(dir), which coalesced all same-name segments into one
token stream. This caused the second definition name to be misinterpreted
as a matcher module name, producing 'module not registered: http.matchers.@name'
instead of the correct 'matcher is defined more than once' error.

By parsing segments individually, the existing duplicate check in
parseMatcherDefinitions naturally catches the duplicate on the second pass.

Signed-off-by: Brunotlps <brunoteixlps@gmail.com>
2026-05-30 07:05:41 +10:00
..
caddyfile chore: clean up wording and typo fixes (#7745) 2026-05-20 16:36:30 +10:00
httpcaddyfile httpcaddyfile: fix incorrect error message on duplicate matchers (#7780) 2026-05-30 07:05:41 +10:00
configadapters.go
httploader.go chore: Enable modernize linter (#7519) 2026-02-26 14:01:35 -07:00
load.go