summaryrefslogtreecommitdiff
path: root/caddytest
diff options
context:
space:
mode:
authorFrancis Lavoie <lavofr@gmail.com>2020-09-22 19:37:15 -0400
committerGitHub <noreply@github.com>2020-09-22 17:37:15 -0600
commitbe6daa5fd46edc9f66a5129347482b38e22bf103 (patch)
tree4c1bdbb1bb1cabfe90146f674819ebaf3e52759e /caddytest
parentfe27f9cf0c7f53c891c35fbcf6a6b3219e85fd0a (diff)
httpcaddyfile: Fix panic when parsing route with matchers (#3746)
Fixes #3745
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/integration/caddyfile_adapt/matchers_in_route.txt31
1 files changed, 31 insertions, 0 deletions
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