changeset 821:d75000247e1f

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.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 26 Jan 2016 16:57:33 +0300
parents 45471a9017cc
children 92e20c77c916
files h2.t
diffstat 1 files changed, 20 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(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