comparison proxy_cache.t @ 178:168e63df025b

Tests: caching of empty responses fixed in 1.1.5, remove TODO.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 01 Nov 2011 21:13:16 +0300
parents c0ae29632905
children f9325406df0b
comparison
equal deleted inserted replaced
177:89d3041856b3 178:168e63df025b
97 'cached multipart range'); 97 'cached multipart range');
98 98
99 like(http_get('/empty.html'), qr/HTTP/, 'empty get first'); 99 like(http_get('/empty.html'), qr/HTTP/, 'empty get first');
100 like(http_get('/empty.html'), qr/HTTP/, 'empty get second'); 100 like(http_get('/empty.html'), qr/HTTP/, 'empty get second');
101 101
102 {
103 local $TODO = 'not fixed yet';
104
105 sleep(2); 102 sleep(2);
106 unlink $t->testdir() . '/t.html'; 103 unlink $t->testdir() . '/t.html';
107 like(http_gzip_request('/t.html'), 104 like(http_gzip_request('/t.html'),
108 qr/HTTP.*1c\x0d\x0a.{28}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, 105 qr/HTTP.*1c\x0d\x0a.{28}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s,
109 'non-empty get stale'); 106 'non-empty get stale');
110 }
111
112 {
113 local $TODO = 'broken in 0.8.31';
114 107
115 unlink $t->testdir() . '/empty.html'; 108 unlink $t->testdir() . '/empty.html';
116 like(http_gzip_request('/empty.html'), 109 like(http_gzip_request('/empty.html'),
117 qr/HTTP.*14\x0d\x0a.{20}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, 110 qr/HTTP.*14\x0d\x0a.{20}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s,
118 'empty get stale'); 111 'empty get stale');
119 }
120 112
121 { 113 {
122 local $TODO = 'patch pending'; 114 local $TODO = 'patch pending';
123 115
124 http_get('/fake/unfinished'); 116 http_get('/fake/unfinished');