Mercurial > hg > nginx-tests
comparison h2.t @ 1690:29f0e926c15f
Tests: removed HTTP/2 Upgrade-based negotiation tests.
The HTTP/1.1 Upgrade mechanism is no longer specified in the current http2bis.
See also: https://github.com/BishopFox/h2csmuggler
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 25 May 2021 16:50:14 +0300 |
parents | a78eedc39484 |
children | 5ac6efbe5552 |
comparison
equal
deleted
inserted
replaced
1689:dbd19195df8a | 1690:29f0e926c15f |
---|---|
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(144); | 29 ->plan(142); |
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 |
143 | 143 |
144 $t->write_file('t2.html', 'SEE-THIS'); | 144 $t->write_file('t2.html', 'SEE-THIS'); |
145 | 145 |
146 ############################################################################### | 146 ############################################################################### |
147 | 147 |
148 # Upgrade mechanism | |
149 | |
150 my $r = http(<<EOF); | |
151 GET / HTTP/1.1 | |
152 Host: localhost | |
153 Connection: Upgrade, HTTP2-Settings | |
154 Upgrade: h2c | |
155 HTTP2-Settings: AAMAAABkAAQAAP__ | |
156 | |
157 EOF | |
158 | |
159 SKIP: { | |
160 skip 'no Upgrade-based negotiation', 2 if $r !~ m!HTTP/1.1 101!; | |
161 | |
162 like($r, qr!Connection: Upgrade!, 'upgrade - connection'); | |
163 like($r, qr!Upgrade: h2c!, 'upgrade - token'); | |
164 | |
165 } | |
166 | |
167 # SETTINGS | 148 # SETTINGS |
168 | 149 |
169 my $s = Test::Nginx::HTTP2->new(port(8080), pure => 1); | 150 my $s = Test::Nginx::HTTP2->new(port(8080), pure => 1); |
170 my $frames = $s->read(all => [ | 151 my $frames = $s->read(all => [ |
171 { type => 'WINDOW_UPDATE' }, | 152 { type => 'WINDOW_UPDATE' }, |