Mercurial > hg > nginx-tests
comparison h2.t @ 1108:ff1a37f37419
Tests: removed seemingly useless and unsafe HTTP/2 RST_STREAM test.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 10 Jan 2017 14:56:57 +0300 |
parents | d42cc683970d |
children | ec9ddfed9b63 |
comparison
equal
deleted
inserted
replaced
1107:d42cc683970d | 1108:ff1a37f37419 |
---|---|
24 | 24 |
25 select STDERR; $| = 1; | 25 select STDERR; $| = 1; |
26 select STDOUT; $| = 1; | 26 select STDOUT; $| = 1; |
27 | 27 |
28 my $t = Test::Nginx->new()->has(qw/http http_v2 proxy rewrite charset gzip/) | 28 my $t = Test::Nginx->new()->has(qw/http http_v2 proxy rewrite charset gzip/) |
29 ->plan(141); | 29 ->plan(140); |
30 | 30 |
31 $t->write_file_expand('nginx.conf', <<'EOF'); | 31 $t->write_file_expand('nginx.conf', <<'EOF'); |
32 | 32 |
33 %%TEST_GLOBALS%% | 33 %%TEST_GLOBALS%% |
34 | 34 |
809 $frames = $s->read(all => [{ type => 'PING' }]); | 809 $frames = $s->read(all => [{ type => 'PING' }]); |
810 ok(!grep ({ $_->{type} eq "PING" } @$frames), 'large response - send timeout'); | 810 ok(!grep ({ $_->{type} eq "PING" } @$frames), 'large response - send timeout'); |
811 | 811 |
812 } | 812 } |
813 | 813 |
814 # stream with large response queued on write - RST_STREAM handling | |
815 | |
816 $s = Test::Nginx::HTTP2->new(); | |
817 $sid = $s->new_stream({ path => '/tbig.html' }); | |
818 | |
819 $s->h2_window(2**30, $sid); | |
820 $s->h2_window(2**30); | |
821 | |
822 select undef, undef, undef, 0.4; | |
823 | |
824 $s->h2_rst($sid, 8); | |
825 $s->read(all => [{ sid => $sid, fin => 1 }], wait => 0.2); | |
826 | |
827 $sid = $s->new_stream(); | |
828 $frames = $s->read(all => [{ sid => $sid, fin => 1 }]); | |
829 | |
830 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; | |
831 is($frame->{sid}, 3, 'large response - queued with RST_STREAM'); | |
832 | |
833 # SETTINGS_MAX_FRAME_SIZE | 814 # SETTINGS_MAX_FRAME_SIZE |
834 | 815 |
835 $s = Test::Nginx::HTTP2->new(); | 816 $s = Test::Nginx::HTTP2->new(); |
836 $sid = $s->new_stream({ path => '/frame_size' }); | 817 $sid = $s->new_stream({ path => '/frame_size' }); |
837 $s->h2_window(2**18, 1); | 818 $s->h2_window(2**18, 1); |