Mercurial > hg > nginx-tests
changeset 667:0247e314e991
Tests: more HTTP/2 error handling tests.
Detect RST_STREAM when http2_max_concurrent_streams exceeded.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 01 Sep 2015 14:54:22 +0300 |
parents | 64f22e0aaab2 |
children | 1f34870e9538 |
files | h2.t |
diffstat | 1 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/h2.t Thu Aug 27 15:19:27 2015 +0300 +++ b/h2.t Tue Sep 01 14:54:22 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(155); + ->has_daemon('openssl')->plan(159); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -1398,11 +1398,22 @@ is($frame->{headers}->{':status'}, 200, 'http2_max_concurrent_streams'); $sid2 = new_stream($sess, { path => '/t1.html' }); -$frames = h2_read($sess); +$frames = h2_read($sess, all => [{ type => 'RST_STREAM' }]); ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid2 } @$frames; isnt($frame->{headers}->{':status'}, 200, 'http2_max_concurrent_streams 2'); +TODO: { +local $TODO = 'not yet'; + +($frame) = grep { $_->{type} eq "RST_STREAM" && $_->{sid} == $sid2 } @$frames; +is($frame->{sid}, $sid2, 'http2_max_concurrent_streams RST_STREAM sid'); +is($frame->{length}, 4, 'http2_max_concurrent_streams RST_STREAM length'); +is($frame->{flags}, 0, 'http2_max_concurrent_streams RST_STREAM flags'); +is($frame->{code}, 7, 'http2_max_concurrent_streams RST_STREAM code'); + +} + h2_window($sess, 2**16, $sid); h2_read($sess, all => [{ sid => $sid, fin => 1 }]);