Mercurial > hg > nginx-tests
comparison h2_ssl.t @ 1741:3408029c09f5
Tests: added HTTP/2 test with rejected ALPN.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 21 Oct 2021 13:56:15 +0300 |
parents | f7e667a4898d |
children | 2318ed01ce53 |
comparison
equal
deleted
inserted
replaced
1740:f7e667a4898d | 1741:3408029c09f5 |
---|---|
87 open OLDERR, ">&", \*STDERR; close STDERR; | 87 open OLDERR, ">&", \*STDERR; close STDERR; |
88 $t->run(); | 88 $t->run(); |
89 open STDERR, ">&", \*OLDERR; | 89 open STDERR, ">&", \*OLDERR; |
90 | 90 |
91 plan(skip_all => 'no ALPN negotiation') unless defined getconn(); | 91 plan(skip_all => 'no ALPN negotiation') unless defined getconn(); |
92 $t->plan(2); | 92 $t->plan(3); |
93 | 93 |
94 ############################################################################### | 94 ############################################################################### |
95 | |
96 TODO: { | |
97 local $TODO = 'not yet' unless $t->has_version('1.21.4'); | |
98 | |
99 ok(!get_ssl_socket(['unknown']), 'alpn rejected'); | |
100 | |
101 } | |
95 | 102 |
96 like(http_get('/', socket => get_ssl_socket(['http/1.1'])), | 103 like(http_get('/', socket => get_ssl_socket(['http/1.1'])), |
97 qr/200 OK/, 'alpn to HTTP/1.1 fallback'); | 104 qr/200 OK/, 'alpn to HTTP/1.1 fallback'); |
98 | 105 |
99 my $s = getconn(['http/1.1', 'h2']); | 106 my $s = getconn(['http/1.1', 'h2']); |