Mercurial > hg > nginx-tests
changeset 740:3e2676108d69
Tests: added HTTP/2 test for queued stream cleanup.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 19 Oct 2015 17:04:25 +0300 |
parents | 610e394a6e73 |
children | a2e7f5ff3aa8 |
files | h2.t |
diffstat | 1 files changed, 20 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/h2.t Mon Oct 19 17:03:23 2015 +0300 +++ b/h2.t Mon Oct 19 17:04:25 2015 +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(227); + ->has_daemon('openssl')->plan(228); # Some systems have a bug in not treating zero writev iovcnt as EINVAL @@ -1359,6 +1359,25 @@ $sum = eval join '+', map { $_->{length} } @data; is($sum, 5000000, 'large response - DATA'); +# stream with large response queued on write - RST_STREAM handling + +$sess = new_session(); +$sid = new_stream($sess, { path => '/tbig.html' }); + +h2_window($sess, 2**30, $sid); +h2_window($sess, 2**30); + +select undef, undef, undef, 0.4; + +h2_rst($sess, $sid, 8); +h2_read($sess, all => [{ sid => $sid, fin => 1 }]); + +$sid = new_stream($sess); +$frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]); + +($frame) = grep { $_->{type} eq "HEADERS" } @$frames; +is($frame->{sid}, 3, 'large response - queued with RST_STREAM'); + # SETTINGS_MAX_FRAME_SIZE $sess = new_session();