# HG changeset patch # User Sergey Kandaurov # Date 1440434741 -10800 # Node ID c99c30afc1c91065c6a875cd494623b97d1dd885 # Parent b0342dbd9390326e5dc68bed85b68318b02a6a57 Tests: one more test for http2_max_concurrent_streams. Ensure that the directive limits only active streams. 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(152); + ->has_daemon('openssl')->plan(153); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -1339,6 +1339,15 @@ is($frame->{headers}->{':status'}, 200, ($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid2 } @$frames; isnt($frame->{headers}->{':status'}, 200, 'http2_max_concurrent_streams 2'); +h2_window($sess, 2**16, $sid); +h2_read($sess, all => [{ sid => $sid, fin => 1 }]); + +$sid = new_stream($sess, { path => '/t2.html' }); +$frames = h2_read($sess, all => [{ sid => $sid, fin => 1 }]); + +($frame) = grep { $_->{type} eq "HEADERS" && $_->{sid} == $sid } @$frames; +is($frame->{headers}->{':status'}, 200, 'http2_max_concurrent_streams 3'); + # some invalid cases below