Mercurial > hg > nginx-tests
comparison ssi.t @ 91:ec89d4d65bef
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 26 May 2009 17:21:59 +0400 |
parents | c8ba98ad0570 |
children | b8b901f86518 |
comparison
equal
deleted
inserted
replaced
90:1d3c82227a05 | 91:ec89d4d65bef |
---|---|
19 ############################################################################### | 19 ############################################################################### |
20 | 20 |
21 select STDERR; $| = 1; | 21 select STDERR; $| = 1; |
22 select STDOUT; $| = 1; | 22 select STDOUT; $| = 1; |
23 | 23 |
24 my $t = Test::Nginx->new()->plan(9); | 24 my $t = Test::Nginx->new()->plan(11); |
25 | 25 |
26 $t->write_file_expand('nginx.conf', <<'EOF'); | 26 $t->write_file_expand('nginx.conf', <<'EOF'); |
27 | 27 |
28 master_process off; | 28 master_process off; |
29 daemon off; | 29 daemon off; |
40 proxy_temp_path %%TESTDIR%%/proxy_temp; | 40 proxy_temp_path %%TESTDIR%%/proxy_temp; |
41 | 41 |
42 server { | 42 server { |
43 listen 127.0.0.1:8080; | 43 listen 127.0.0.1:8080; |
44 server_name localhost; | 44 server_name localhost; |
45 ssi on; | 45 location / { |
46 ssi on; | |
47 } | |
48 location /proxy/ { | |
49 ssi on; | |
50 proxy_pass http://127.0.0.1:8080/local/; | |
51 } | |
52 location /local/ { | |
53 ssi off; | |
54 alias %%TESTDIR%%/; | |
55 } | |
46 } | 56 } |
47 } | 57 } |
48 | 58 |
49 EOF | 59 EOF |
50 | 60 |
69 | 79 |
70 like(http_get('/test2.html'), qr/^XXtestXX$/m, 'argument via include'); | 80 like(http_get('/test2.html'), qr/^XXtestXX$/m, 'argument via include'); |
71 | 81 |
72 like(http_get('/test3.html'), qr/^XtestX$/m, 'set'); | 82 like(http_get('/test3.html'), qr/^XtestX$/m, 'set'); |
73 | 83 |
84 # Last-Modified and Accept-Ranges headers should be cleared | |
85 | |
86 unlike(http_get('/test1.html'), qr/Last-Modified|Accept-Ranges/im, | |
87 'cleared headers'); | |
88 | |
89 TODO: { | |
90 local $TODO = 'broken since 0.7.44'; | |
91 | |
92 unlike(http_get('/proxy/test1.html'), qr/Last-Modified|Accept-Ranges/im, | |
93 'cleared headers from proxy'); | |
94 | |
95 } | |
96 | |
74 ############################################################################### | 97 ############################################################################### |