Mercurial > hg > nginx-tests
diff ssi.t @ 95:cbc17561ef4d
Merge.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 08 Jun 2009 23:06:18 +0400 |
parents | ec89d4d65bef |
children | b8b901f86518 |
line wrap: on
line diff
--- a/ssi.t +++ b/ssi.t @@ -21,7 +21,7 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->plan(9); +my $t = Test::Nginx->new()->plan(11); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -42,7 +42,17 @@ http { server { listen 127.0.0.1:8080; server_name localhost; - ssi on; + location / { + ssi on; + } + location /proxy/ { + ssi on; + proxy_pass http://127.0.0.1:8080/local/; + } + location /local/ { + ssi off; + alias %%TESTDIR%%/; + } } } @@ -71,4 +81,17 @@ like(http_get('/test2.html'), qr/^XXtest like(http_get('/test3.html'), qr/^XtestX$/m, 'set'); +# Last-Modified and Accept-Ranges headers should be cleared + +unlike(http_get('/test1.html'), qr/Last-Modified|Accept-Ranges/im, + 'cleared headers'); + +TODO: { +local $TODO = 'broken since 0.7.44'; + +unlike(http_get('/proxy/test1.html'), qr/Last-Modified|Accept-Ranges/im, + 'cleared headers from proxy'); + +} + ###############################################################################