# HG changeset patch # User Sergey Kandaurov # Date 1442226217 -10800 # Node ID 3f4a132c6463263a475ce8ebd3b4315283979b4e # Parent a894f041244e39bd7acefb22ea6d0ef715b10a31 Tests: extended HTTP/2 tests for GOAWAY on compression error. diff -r a894f041244e -r 3f4a132c6463 h2.t --- a/h2.t Fri Sep 11 18:36:08 2015 +0300 +++ b/h2.t Mon Sep 14 13:23:37 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(177); + ->has_daemon('openssl')->plan(179); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -527,6 +527,17 @@ ($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');