# HG changeset patch # User Maxim Dounin # Date 1243344119 -14400 # Node ID ec89d4d65bef58c84be98ed3ef67fe77f5a39a0b # Parent 1d3c82227a0529392544847cd9b0018263db0b9a Tests: Last-Modified and Accept-Ranges should be cleared on ssi. As of 0.7.44 (cache support) they are no longer cleared when got from upstream. Probably other filters (e.g. xslt) are affected as well. diff --git a/limit-req.t b/limit-req.t --- a/limit-req.t +++ b/limit-req.t @@ -29,6 +29,7 @@ master_process off; daemon off; events { + use select; } http { diff --git a/ssi.t b/ssi.t --- 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'); + +} + ###############################################################################