# HG changeset patch # User Maxim Dounin # Date 1359372328 -14400 # Node ID 8b554d26eb1a9b56044538aa57df989c4c7aa2ca # Parent df984d23f9d1ef8ac054849dd76f5cd4bd1a6ffb Tests: client_body_in_file_only with proxy test. diff --git a/body.t b/body.t --- a/body.t +++ b/body.t @@ -22,7 +22,7 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http proxy rewrite/)->plan(10); +my $t = Test::Nginx->new()->has(qw/http proxy rewrite/)->plan(11); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -55,6 +55,10 @@ http { add_header X-Body-File "$request_body_file"; proxy_pass http://127.0.0.1:8081; } + location /small { + client_body_in_file_only on; + proxy_pass http://127.0.0.1:8080/; + } location /single { client_body_in_single_buffer on; add_header X-Body "$request_body"; @@ -113,6 +117,16 @@ like(http_get_body('/discard', '01234567 '0123456789', 'foobar'), qr/(TEST.*){4}/ms, 'body discard 2'); +TODO: { +local $TODO = 'broken by 1.3.9'; + +# proxy with file only + +like(http_get_body('/small', '0123456789'), + qr/X-Body: 0123456789\x0d?$/ms, 'small body in file only'); + +} + ############################################################################### sub read_body_file {