# HG changeset patch # User Sergey Kandaurov # Date 1445980305 -10800 # Node ID 01feb5d4d7a4d8bf73a4643cb53513abc33dc8dd # Parent 4db976a91540379bd0efc1030f35f7d98e33357e Tests: HTTP/2 test for CONTINUATION on a closed stream. 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(249); + ->has_daemon('openssl')->plan(251); # Some systems may have also a bug in not treating zero writev iovcnt as EINVAL @@ -1025,6 +1025,16 @@ is($frame->{headers}->{'x-referer'}, 'fo ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; is($frame->{headers}->{':status'}, 200, 'CONTINUATION - in header field'); +# CONTINUATION on a closed stream + +h2_continue($sess, 1, { headers => [ + { name => 'x-foo', value => 'X-Bar', mode => 2 }]}); +$frames = h2_read($sess, all => [{ sid => 1, fin => 1 }]); + +($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; +is($frame->{type}, 'GOAWAY', 'GOAWAY - CONTINUATION closed stream'); +is($frame->{code}, 1, 'GOAWAY - CONTINUATION closed stream - PROTOCOL_ERROR'); + # frame padding $sess = new_session();