diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2022-04-05 18:09:11 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2022-04-08 06:33:02 -0400 |
commit | 7258624e51b4bdb1b79f19f6c31ca7814cabcee1 (patch) | |
tree | 19052efb2817dc39961552ee13e0ca7bc254d81c /tests/lighttpd.conf | |
parent | dcb5f2318b163028f4bb7a18b2211facbd997713 (diff) | |
download | lighttpd-git-7258624e51b4bdb1b79f19f6c31ca7814cabcee1.tar.gz |
[tests] able to run tests when built w/o pcre
perl test framework now runs most tests even when lighttpd has been
built without pcre support, though some tests which rely on regex
are skipped (tests/core-condition.t)
Diffstat (limited to 'tests/lighttpd.conf')
-rw-r--r-- | tests/lighttpd.conf | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/tests/lighttpd.conf b/tests/lighttpd.conf index 6ad9d65c..7b224173 100644 --- a/tests/lighttpd.conf +++ b/tests/lighttpd.conf @@ -94,11 +94,6 @@ extforward.forwarder = ( "127.0.30.1" => "trust", ) -url.access-deny = ( - "~", - ".inc", -) - expire.url = ( "/expire/access" => "access 2 hours", "/expire/modification" => "access plus 1 seconds 2 minutes", @@ -123,7 +118,7 @@ else { simple-vhost.default-host = "www.example.org" } -$HTTP["host"] =~ "bug255\.example\.org$" { +$HTTP["host"] == "bug255.example.org" { $HTTP["remoteip"] == "127.0.0.1" { url.access-deny = ( "", @@ -131,7 +126,12 @@ $HTTP["host"] =~ "bug255\.example\.org$" { } } -$HTTP["referer"] !~ "^($|http://referer\.example\.org)" { +#$HTTP["referer"] !~ "^($|http://referer\.example\.org)" { +$HTTP["referer"] =^ "http://referer.example.org" { +} +else $HTTP["referer"] == "" { +} +else { url.access-deny = ( ".jpg", ) @@ -139,14 +139,19 @@ $HTTP["referer"] !~ "^($|http://referer\.example\.org)" { # deny access for all image stealers $HTTP["host"] == "referer.example.org" { - $HTTP["referer"] !~ "^($|http://referer\.example\.org)" { + #$HTTP["referer"] !~ "^($|http://referer\.example\.org)" { + $HTTP["referer"] =^ "http://referer.example.org" { + } + else $HTTP["referer"] == "" { + } + else { url.access-deny = ( ".png", ) } } -$HTTP["cookie"] =~ "empty-ref" { +$HTTP["cookie"] =~ "^empty-ref$" { $HTTP["referer"] == "" { url.access-deny = ( "", @@ -154,20 +159,15 @@ $HTTP["cookie"] =~ "empty-ref" { } } -$HTTP["host"] =~ "allow\.example\.org$" { - url.access-allow = ( ".txt" ) # allow takes precedence over deny - url.access-deny = ( ".txt" ) -} - $HTTP["host"] == "cgi.example.org" { cgi.x-sendfile = "enable" } $HTTP["host"] == "errors.example.org" { - $HTTP["url"] =~ "^/static/" { + $HTTP["url"] =^ "/static/" { server.error-handler-404 = "/404.html" } - else $HTTP["url"] =~ "^/dynamic/redirect_status/" { + else $HTTP["url"] =^ "/dynamic/redirect_status/" { server.error-handler = "/404.pl" } else { @@ -203,7 +203,11 @@ $HTTP["host"] == "lowercase-auth" { ) } -$HTTP["host"] =~ "^deflate(?:-cache)?\.example\.org$" { +deflate.allowed-encodings = ( + "gzip", + "deflate", +) +$HTTP["host"] == "deflate.example.org" { $HTTP["url"] == "/index.txt" { # (force Content-Type for test; do not copy) setenv.set-response-header = ( @@ -214,13 +218,13 @@ $HTTP["host"] =~ "^deflate(?:-cache)?\.example\.org$" { "text/plain", "text/html", ) - deflate.allowed-encodings = ( - "gzip", - "deflate", +} +$HTTP["host"] == "deflate-cache.example.org" { + deflate.mimetypes = ( + "text/plain", + "text/html", ) - $HTTP["host"] == "deflate-cache.example.org" { - deflate.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/" - } + deflate.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/" } $HTTP["host"] =~ "^auth-" { |