Mercurial > hg > nginx-tests
comparison limit-req.t @ 97:506586cc2f3b
Tests: limit_req fixed in 0.8.5, remove TODO.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 13 Jul 2009 17:49:59 +0400 |
parents | 390588796411 |
children | 4ae2198b97ec |
comparison
equal
deleted
inserted
replaced
96:ecff5407867c | 97:506586cc2f3b |
---|---|
64 | 64 |
65 like(http_get('/test1.html'), qr/^HTTP\/1.. 200 /m, 'request'); | 65 like(http_get('/test1.html'), qr/^HTTP\/1.. 200 /m, 'request'); |
66 http_get('/test1.html'); | 66 http_get('/test1.html'); |
67 like(http_get('/test1.html'), qr/^HTTP\/1.. 503 /m, 'request rejected'); | 67 like(http_get('/test1.html'), qr/^HTTP\/1.. 503 /m, 'request rejected'); |
68 | 68 |
69 TODO: { | |
70 local $TODO = "patch under review"; | |
71 | |
72 # Second request will be delayed by limit_req, make sure it isn't truncated. | 69 # Second request will be delayed by limit_req, make sure it isn't truncated. |
73 # The bug only manifests itself if buffer will be filled, so sleep for a while | 70 # The bug only manifests itself if buffer will be filled, so sleep for a while |
74 # before reading response. | 71 # before reading response. |
75 | 72 |
76 my $l1 = length(http_get('/long.html')); | 73 my $l1 = length(http_get('/long.html')); |
77 my $l2 = length(http_get('/long.html', sleep => 1.1)); | 74 my $l2 = length(http_get('/long.html', sleep => 1.1)); |
78 is($l2, $l1, 'delayed big request not truncated'); | 75 is($l2, $l1, 'delayed big request not truncated'); |
79 | 76 |
80 } | |
81 | |
82 ############################################################################### | 77 ############################################################################### |