# HG changeset patch # User Maxim Dounin # Date 1241913200 -14400 # Node ID 9ab3762332b94ee915dcc829e31518fa9a0168ce # Parent 1d3c82227a0529392544847cd9b0018263db0b9a Tests: chunked tests for unbuffered and inmemory proxy. Note that while these two modes currently use the same filter function they are quite different. Only one continuous buffer (u->buffer) used for subrequest_in_memory and this means that chunk-data should be concatenated somehow (memmove?). diff --git a/proxy-chunked.t b/proxy-chunked.t --- a/proxy-chunked.t +++ b/proxy-chunked.t @@ -13,7 +13,7 @@ use warnings; use strict; -use Test::More tests => 1; +use Test::More tests => 3; use IO::Select; @@ -53,11 +53,22 @@ http { proxy_pass http://127.0.0.1:8081; proxy_read_timeout 1s; } + location /nobuffering { + proxy_pass http://127.0.0.1:8081; + proxy_read_timeout 1s; + proxy_buffering off; + } + location /inmemory.html { + ssi on; + } } } EOF +$t->write_file('inmemory.html', + ''); + $t->run_daemon(\&http_chunked_daemon); $t->run(); @@ -67,6 +78,8 @@ EOF local $TODO = 'not yet'; like(http_get('/'), qr/\x0d\x0aSEE-THIS$/s, 'chunked'); +like(http_get('/nobuffering'), qr/\x0d\x0aSEE-THIS$/s, 'chunked nobuffering'); +like(http_get('/inmemory.html'), qr/\x0d\x0aSEE-THIS$/s, 'chunked inmemory'); } ###############################################################################