# HG changeset patch # User Sergey Kandaurov # Date 1453816653 -10800 # Node ID d75000247e1f77f2b763d8e8a58d8b60d6ba75b6 # Parent 45471a9017cc869796dbc1f3673d7a8bcd043683 Tests: added HTTP/2 test for padded HEADERS with CONTINUATION. Reported by Shengtuo Hu, see http://mailman.nginx.org/pipermail/nginx/2016-January/049693.html. 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(292); + ->has_daemon('openssl')->plan(293); # Some systems may have also a bug in not treating zero writev iovcnt as EINVAL @@ -1085,6 +1085,25 @@ is($frame->{headers}->{':status'}, 200, ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; is($frame->{headers}->{':status'}, 200, 'padding - next stream'); +# padding followed by CONTINUATION + +TODO: { +local $TODO = 'not yet'; + +$sess = new_session(); +$sid = new_stream($sess, { padding => 42, continuation => [ 2, 4, 1, 5 ], + headers => [ + { name => ':method', value => 'GET', mode => 1 }, + { name => ':scheme', value => 'http', mode => 0 }, + { name => ':path', value => '/', mode => 0 }, + { name => ':authority', value => 'localhost', mode => 1 }]}); +$frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]); + +($frame) = grep { $_->{type} eq "HEADERS" } @$frames; +is($frame->{headers}->{':status'}, 200, 'padding - CONTINUATION'); + +} + # request header field with multiple values # 8.1.2.5. Compressing the Cookie Header Field