changeset 761:01feb5d4d7a4

Tests: HTTP/2 test for CONTINUATION on a closed stream.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 28 Oct 2015 00:11:45 +0300
parents 4db976a91540
children f28debc81182
files h2.t
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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();