Mercurial > hg > nginx-tests
comparison proxy-cache.t @ 120:598b758c68a9
Tests: empty cached responses partially fixed in 0.8.31.
Fix doesn't address duplicate final chunks though, and I believe the fix is
generally wrong.
While it's probably ok to return non-gzipped empty response instead of gzipped
one in 'empty get stale' test - addition filter will be clearly broken. So
mark this test as broken instead of changing it.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 24 Dec 2009 16:54:43 +0300 |
parents | 1c0ec30614c6 |
children | 8ac1faaddd2c |
comparison
equal
deleted
inserted
replaced
119:18fc08c160ce | 120:598b758c68a9 |
---|---|
87 unlike(http_head('/t2.html'), qr/SEE-THIS/, 'head request'); | 87 unlike(http_head('/t2.html'), qr/SEE-THIS/, 'head request'); |
88 like(http_get('/t2.html'), qr/SEE-THIS/, 'get after head'); | 88 like(http_get('/t2.html'), qr/SEE-THIS/, 'get after head'); |
89 unlike(http_head('/t2.html'), qr/SEE-THIS/, 'head after get'); | 89 unlike(http_head('/t2.html'), qr/SEE-THIS/, 'head after get'); |
90 | 90 |
91 like(http_get('/empty.html'), qr/HTTP/, 'empty get first'); | 91 like(http_get('/empty.html'), qr/HTTP/, 'empty get first'); |
92 like(http_get('/empty.html'), qr/HTTP/, 'empty get second'); | |
93 | |
92 { | 94 { |
93 local $TODO = 'not fixed yet'; | 95 local $TODO = 'not fixed yet'; |
94 like(http_get('/empty.html'), qr/HTTP/, 'empty get second'); | |
95 | 96 |
96 sleep(2); | 97 sleep(2); |
97 unlink $t->testdir() . '/t.html'; | 98 unlink $t->testdir() . '/t.html'; |
98 like(http_gzip_request('/t.html'), | 99 like(http_gzip_request('/t.html'), |
99 qr/HTTP.*1c\x0d\x0a.{28}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, | 100 qr/HTTP.*1c\x0d\x0a.{28}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, |
100 'non-empty get stale'); | 101 'non-empty get stale'); |
101 } | 102 } |
102 | 103 |
104 { | |
105 local $TODO = 'broken in 0.8.31'; | |
106 | |
103 unlink $t->testdir() . '/empty.html'; | 107 unlink $t->testdir() . '/empty.html'; |
104 like(http_gzip_request('/empty.html'), | 108 like(http_gzip_request('/empty.html'), |
105 qr/HTTP.*14\x0d\x0a.{20}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, | 109 qr/HTTP.*14\x0d\x0a.{20}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, |
106 'empty get stale'); | 110 'empty get stale'); |
111 } | |
107 | 112 |
108 ############################################################################### | 113 ############################################################################### |