changeset 691:3f4a132c6463

Tests: extended HTTP/2 tests for GOAWAY on compression error.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 14 Sep 2015 13:23:37 +0300
parents a894f041244e
children a16d4a768197
files h2.t
diffstat 1 files changed, 12 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(177);
+	->has_daemon('openssl')->plan(179);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -527,6 +527,17 @@ local $TODO = 'not yet';
 ($frame) = grep { $_->{type} eq "GOAWAY" } @$frames;
 ok($frame, 'invalid index - GOAWAY');
 
+# RFC 7541, 2.3.3.  Index Address Space
+#   Indices strictly greater than the sum of the lengths of both tables
+#   MUST be treated as a decoding error.
+
+# 4.3.  Header Compression and Decompression
+#   A decoding error in a header block MUST be treated
+#   as a connection error of type COMPRESSION_ERROR.
+
+is($frame->{last_sid}, $sid, 'invalid index - GOAWAY last stream');
+is($frame->{code}, 9, 'invalid index - GOAWAY COMPRESSION_ERROR');
+
 }
 
 h2_ping($sess, 'SEE-THIS');