Mercurial > hg > nginx-tests
changeset 860:cba4b1bccfd1
Tests: HTTP/2 test with empty request body delayed in limit_req.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 26 Feb 2016 17:59:04 +0300 |
parents | 63babcdd08db |
children | 6868e610eacc |
files | h2.t |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/h2.t Fri Feb 26 17:29:01 2016 +0300 +++ b/h2.t Fri Feb 26 17:59:04 2016 +0300 @@ -32,7 +32,7 @@ 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 @@ 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);