# HG changeset patch # User Sergey Kandaurov # Date 1624957059 -10800 # Node ID 6c03c329ed95f466762565441b8d3c81cf5ff7fc # Parent f3de5730bc060ee87eb9c27028fe762656f9952a Tests: requests with both Content-Length and Transfer-Encoding. diff --git a/body_chunked.t b/body_chunked.t --- a/body_chunked.t +++ b/body_chunked.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(16); +my $t = Test::Nginx->new()->has(qw/http proxy rewrite/)->plan(17); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -178,6 +178,14 @@ like(http_transfer_encoding("chunked\nTr like(http_transfer_encoding('chunked, identity'), qr/501 Not Implemented/, 'transfer encoding list'); +TODO: { +local $TODO = 'not yet' unless $t->has_version('1.21.1'); + +like(http_transfer_encoding("chunked\nContent-Length: 5"), qr/400 Bad/, + 'transfer encoding with content-length'); + +} + ############################################################################### sub read_body_file {