diff t/bytes.t @ 17:314242bda1c1

Correctly handle last ignored buffer again. If we ignore buffer marked as last_buf, make sure we pass out empty buffer marked as last_buf. The same problem was already fixed in rev. 48cdd1bfa48e, but only for optimized special case (last range and last buffer).
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 02 Feb 2009 19:54:12 +0300
parents d6f0d7a8d752
children
line wrap: on
line diff
--- a/t/bytes.t
+++ b/t/bytes.t
@@ -17,7 +17,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->plan(24);
+my $t = Test::Nginx->new()->plan(25);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -76,6 +76,10 @@ like($t1, qr/200/, 'final bytes');
 like($t1, qr/Content-Length: 10/, 'final bytes length');
 like($t1, qr/^X099XXXXXX$/m, 'final bytes content');
 
+# standard error pages contain multiple buffers in one chain
+
+like(http_get('/notfound?bytes=0-9'), qr/404/, 'not found');
+
 # various range requests
 
 $t1 = http_get_range('/t1?bytes=100-', 'Range: bytes=0-9');