changeset 789:eb257a102a9b

Tests: turn typo into an actual RST_STREAM test with invalid path.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 19 Nov 2015 17:25:19 +0300
parents 1f48ed26b49a
children dfd214db57f4
files h2.t
diffstat 1 files changed, 11 insertions(+), 3 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(290);
+	->has_daemon('openssl')->plan(291);
 
 # Some systems may have also a bug in not treating zero writev iovcnt as EINVAL
 
@@ -2859,10 +2859,18 @@ h2_ping($sess, 'SEE-THIS');
 ($frame) = grep { $_->{type} eq "PING" } @$frames;
 is($frame->{value}, 'SEE-THIS', 'unknown frame type');
 
-# GOAWAY - force closing a connection by server
+# client sent invalid :path header
 
 $sid = new_stream($sess, { path => 't1.html' });
-h2_read($sess, all => [{ sid => $sid, length => 2**16 - 1 }]);
+$frames = h2_read($sess, all => [{ type => 'RST_STREAM' }]);
+
+($frame) = grep { $_->{type} eq "RST_STREAM" } @$frames;
+is($frame->{code}, 1, 'invalid path');
+
+# GOAWAY - force closing a connection by server
+
+$sid = new_stream($sess);
+h2_read($sess, all => [{ sid => $sid, fin => 1 }]);
 
 # graceful shutdown with stream waiting on HEADERS payload