From be6daa5fd46edc9f66a5129347482b38e22bf103 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Tue, 22 Sep 2020 19:37:15 -0400 Subject: httpcaddyfile: Fix panic when parsing route with matchers (#3746) Fixes #3745 --- .../caddyfile_adapt/matchers_in_route.txt | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 caddytest/integration/caddyfile_adapt/matchers_in_route.txt (limited to 'caddytest/integration/caddyfile_adapt') diff --git a/caddytest/integration/caddyfile_adapt/matchers_in_route.txt b/caddytest/integration/caddyfile_adapt/matchers_in_route.txt new file mode 100644 index 0000000..01609b0 --- /dev/null +++ b/caddytest/integration/caddyfile_adapt/matchers_in_route.txt @@ -0,0 +1,31 @@ +:80 { + route { + # unused matchers should not panic + # see https://github.com/caddyserver/caddy/issues/3745 + @matcher1 path /path1 + @matcher2 path /path2 + } +} +---------- +{ + "apps": { + "http": { + "servers": { + "srv0": { + "listen": [ + ":80" + ], + "routes": [ + { + "handle": [ + { + "handler": "subroute" + } + ] + } + ] + } + } + } + } +} \ No newline at end of file -- cgit v1.2.3