# HG changeset patch # User Sergey Kandaurov # Date 1456498744 -10800 # Node ID cba4b1bccfd1fbcb81430e7a775b21e2593eea66 # Parent 63babcdd08db1a4abc61734c0cb7c1877b9a7df9 Tests: HTTP/2 test with empty request body delayed in limit_req. diff --git a/h2.t b/h2.t --- a/h2.t +++ b/h2.t @@ -32,7 +32,7 @@ plan(skip_all => 'IO::Socket::SSL too ol my $t = Test::Nginx->new()->has(qw/http http_ssl http_v2 proxy cache/) ->has(qw/limit_conn rewrite realip shmem/) - ->has_daemon('openssl')->plan(317); + ->has_daemon('openssl')->plan(318); # Some systems may have also a bug in not treating zero writev iovcnt as EINVAL @@ -1585,6 +1585,16 @@ h2_body($sess, 'TEST'); is(read_body_file($frame->{headers}->{'x-body-file'}), 'TEST', 'request body - limit req'); +# request body delayed in limit_req - with an empty DATA frame + +$sess = new_session(); +$sid = new_stream($sess, { path => '/proxy_limit_req/', body_more => 1 }); +h2_body($sess, ''); +$frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]); + +($frame) = grep { $_->{type} eq "HEADERS" } @$frames; +is($frame->{headers}->{':status'}, 200, 'request body - limit req - empty'); + # predict send windows $sid = new_stream($sess);