aboutsummaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-02-10 16:37:08 +0000
committerOmar Polo <op@omarpolo.com>2021-02-10 16:37:08 +0000
commit49b73ba1ab4be9993532bdecaf14e74f45eca676 (patch)
treec79c26c3127f6de5edf1289ea7f838c25207c76c /regress
parent2898780aeac7ff0a456b6f380af2bc3a25a49d3b (diff)
fix "first location" bug
reported by devel at datenbrei dot de. The first location would overwrite the default value for a server, triggering the "`foo' rule specified more than once" error. This also needed a small tweak on how we match locations to avoid breaking other tests.
Diffstat (limited to 'regress')
-rwxr-xr-xregress/runtime9
1 files changed, 7 insertions, 2 deletions
diff --git a/regress/runtime b/regress/runtime
index a05184a..6b1708c 100755
--- a/regress/runtime
+++ b/regress/runtime
@@ -158,6 +158,11 @@ echo OK GET / with custom lang
check "should be running"
+# make sure we can use different lang in different location rules
+config '' 'lang "it" location "/en/*" { lang "en" } location "/de/*" { lang "de" }'
+checkconf
+restart
+
# try with CGI scripts
config '' 'cgi "*"'
checkconf
@@ -204,7 +209,7 @@ echo OK GET /dir/ with custom index
check "should be running"
-config '' 'location "/dir/" { default type "text/plain" index "hello" }'
+config '' 'location "/dir/*" { default type "text/plain" index "hello" }'
checkconf
restart
@@ -217,7 +222,7 @@ echo OK GET /dir/ with location and custom index
check "should be running"
-config '' 'location "/dir/" { auto index on }'
+config '' 'location "/dir/*" { auto index on }'
checkconf
restart