# HG changeset patch # User Maxim Dounin # Date 1717466882 -10800 # Node ID 11463d3795703442f320ef21a58733e74408cd7c # Parent b5e2609d34a385461bc0f2eaf6388f018acc1ce5 Tests: reworked HTTP/2 tests to use "http2 on". diff --git a/grpc.t b/grpc.t --- a/grpc.t +++ b/grpc.t @@ -44,9 +44,10 @@ http { } server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name localhost; + http2 on; http2_body_preread_size 128k; large_client_header_buffers 4 32k; @@ -90,11 +91,7 @@ http { EOF -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/grpc_next_upstream.t b/grpc_next_upstream.t --- a/grpc_next_upstream.t +++ b/grpc_next_upstream.t @@ -69,9 +69,11 @@ http { } server { - listen 127.0.0.1:8081 http2; + listen 127.0.0.1:8081; server_name localhost; + http2 on; + location / { return 404; } @@ -91,9 +93,11 @@ http { } server { - listen 127.0.0.1:8082 http2; + listen 127.0.0.1:8082; server_name localhost; + http2 on; + location / { return 200 "TEST-OK-IF-YOU-SEE-THIS\n"; } @@ -106,11 +110,7 @@ http { EOF -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/grpc_pass.t b/grpc_pass.t --- a/grpc_pass.t +++ b/grpc_pass.t @@ -63,10 +63,12 @@ http { } server { - listen 127.0.0.1:8081 http2; - listen 127.0.0.1:8082 http2 ssl; + listen 127.0.0.1:8081; + listen 127.0.0.1:8082 ssl; server_name localhost; + http2 on; + ssl_certificate_key localhost.key; ssl_certificate localhost.crt; @@ -98,11 +100,7 @@ foreach my $name ('localhost') { $t->run_daemon(\&dns_daemon, port(8982), $t); -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run()->plan(5); -open STDERR, ">&", \*OLDERR; $t->waitforfile($t->testdir . '/' . port(8982)); diff --git a/grpc_request_buffering.t b/grpc_request_buffering.t --- a/grpc_request_buffering.t +++ b/grpc_request_buffering.t @@ -38,10 +38,12 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; listen 127.0.0.1:8082; server_name localhost; + http2 on; + location /mirror { } location / { @@ -64,11 +66,7 @@ http { EOF -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/grpc_ssl.t b/grpc_ssl.t --- a/grpc_ssl.t +++ b/grpc_ssl.t @@ -44,7 +44,7 @@ http { } server { - listen 127.0.0.1:8081 http2 ssl; + listen 127.0.0.1:8081 ssl; server_name localhost; ssl_certificate_key localhost.key; @@ -53,6 +53,7 @@ http { ssl_verify_client optional; ssl_client_certificate client.crt; + http2 on; http2_body_preread_size 128k; location / { @@ -62,9 +63,10 @@ http { } server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name localhost; + http2 on; http2_body_preread_size 128k; location / { @@ -129,11 +131,7 @@ sleep 1 if $^O eq 'MSWin32'; $t->write_file('password', 'client'); -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2.t b/h2.t --- a/h2.t +++ b/h2.t @@ -40,8 +40,10 @@ events { http { %%TEST_GLOBALS_HTTP%% + http2 on; + server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; listen 127.0.0.1:8081; server_name localhost; @@ -88,26 +90,26 @@ http { } server { - listen 127.0.0.1:8082 http2; + listen 127.0.0.1:8082; server_name localhost; return 200 first; } server { - listen 127.0.0.1:8082 http2; + listen 127.0.0.1:8082; server_name localhost2; return 200 second; } server { - listen 127.0.0.1:8083 http2; + listen 127.0.0.1:8083; server_name localhost; http2_max_concurrent_streams 1; } server { - listen 127.0.0.1:8086 http2; + listen 127.0.0.1:8086; server_name localhost; send_timeout 1s; @@ -115,7 +117,7 @@ http { } server { - listen 127.0.0.1:8087 http2; + listen 127.0.0.1:8087; server_name localhost; client_header_timeout 1s; @@ -132,11 +134,7 @@ http { EOF -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; # file size is slightly beyond initial window size: 2**16 + 80 bytes diff --git a/h2_absolute_redirect.t b/h2_absolute_redirect.t --- a/h2_absolute_redirect.t +++ b/h2_absolute_redirect.t @@ -36,10 +36,11 @@ events { http { %%TEST_GLOBALS_HTTP%% + http2 on; absolute_redirect off; server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name on; absolute_redirect on; @@ -75,7 +76,7 @@ http { } server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name off; location / { } @@ -107,11 +108,7 @@ EOF mkdir($t->testdir() . '/dir'); mkdir($t->testdir() . '/dir sp'); -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run()->plan(23); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_auth_request.t b/h2_auth_request.t --- a/h2_auth_request.t +++ b/h2_auth_request.t @@ -39,10 +39,12 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; listen 127.0.0.1:8081; server_name localhost; + http2 on; + location / { return 200; } @@ -66,11 +68,7 @@ http { EOF -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_error_page.t b/h2_error_page.t --- a/h2_error_page.t +++ b/h2_error_page.t @@ -37,9 +37,10 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name localhost; + http2 on; lingering_close off; error_page 400 = /close; @@ -54,11 +55,7 @@ http { EOF -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_fastcgi_request_buffering.t b/h2_fastcgi_request_buffering.t --- a/h2_fastcgi_request_buffering.t +++ b/h2_fastcgi_request_buffering.t @@ -38,9 +38,11 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name localhost; + http2 on; + location / { fastcgi_request_buffering off; fastcgi_pass 127.0.0.1:8081; @@ -52,11 +54,7 @@ http { EOF -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_headers.t b/h2_headers.t --- a/h2_headers.t +++ b/h2_headers.t @@ -37,11 +37,12 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; listen 127.0.0.1:8081; - listen 127.0.0.1:8082 http2 sndbuf=128; + listen 127.0.0.1:8082 sndbuf=128; server_name localhost; + http2 on; large_client_header_buffers 2 64k; location / { @@ -89,31 +90,35 @@ http { } server { - listen 127.0.0.1:8084 http2; + listen 127.0.0.1:8084; server_name localhost; + http2 on; large_client_header_buffers 4 512; } server { - listen 127.0.0.1:8085 http2; + listen 127.0.0.1:8085; server_name localhost; + http2 on; large_client_header_buffers 1 512; } server { - listen 127.0.0.1:8086 http2; + listen 127.0.0.1:8086; server_name localhost; + http2 on; underscores_in_headers on; add_header X-Sent-Foo $http_x_foo always; } server { - listen 127.0.0.1:8087 http2; + listen 127.0.0.1:8087; server_name localhost; + http2 on; ignore_invalid_headers off; add_header X-Sent-Foo $http_x_foo always; } @@ -123,11 +128,7 @@ EOF $t->run_daemon(\&http_daemon); -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; $t->waitforsocket('127.0.0.1:' . port(8083)); diff --git a/h2_keepalive.t b/h2_keepalive.t --- a/h2_keepalive.t +++ b/h2_keepalive.t @@ -39,27 +39,30 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2 sndbuf=1m; + listen 127.0.0.1:8080 sndbuf=1m; server_name localhost; + http2 on; keepalive_requests 2; location / { } } server { - listen 127.0.0.1:8081 http2; + listen 127.0.0.1:8081; server_name localhost; + http2 on; keepalive_timeout 0; location / { } } server { - listen 127.0.0.1:8082 http2; + listen 127.0.0.1:8082; server_name localhost; + http2 on; keepalive_time 1s; add_header X-Conn $connection_requests:$connection_time; @@ -73,11 +76,7 @@ EOF $t->write_file('index.html', 'SEE-THAT' x 50000); $t->write_file('t.html', 'SEE-THAT'); -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_limit_conn.t b/h2_limit_conn.t --- a/h2_limit_conn.t +++ b/h2_limit_conn.t @@ -39,9 +39,11 @@ http { limit_conn_zone $binary_remote_addr zone=conn:1m; server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name localhost; + http2 on; + location /t.html { limit_conn conn 1; } @@ -51,12 +53,7 @@ http { EOF $t->write_file('t.html', 'SEE-THIS'); - -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_limit_req.t b/h2_limit_req.t --- a/h2_limit_req.t +++ b/h2_limit_req.t @@ -41,10 +41,12 @@ http { limit_req_zone $binary_remote_addr zone=req:1m rate=1r/s; server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; listen 127.0.0.1:8081; server_name localhost; + http2 on; + location / { } location /limit_req { limit_req zone=req burst=2; @@ -64,12 +66,7 @@ EOF $t->write_file('index.html', ''); $t->write_file('t.html', 'SEE-THIS'); - -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_priority.t b/h2_priority.t --- a/h2_priority.t +++ b/h2_priority.t @@ -37,18 +37,15 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name localhost; + http2 on; } } EOF -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; # file size is slightly beyond initial window size: 2**16 + 80 bytes diff --git a/h2_proxy_cache.t b/h2_proxy_cache.t --- a/h2_proxy_cache.t +++ b/h2_proxy_cache.t @@ -39,10 +39,12 @@ http { proxy_cache_path %%TESTDIR%%/cache keys_zone=NAME:1m; server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; listen 127.0.0.1:8081; server_name localhost; + http2 on; + location /cache { proxy_pass http://127.0.0.1:8081/; proxy_cache NAME; @@ -68,12 +70,7 @@ EOF $t->write_file('t.html', 'SEE-THIS'); $t->write_file('slow.html', 'SEE-THIS'); - -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_proxy_max_temp_file_size.t b/h2_proxy_max_temp_file_size.t --- a/h2_proxy_max_temp_file_size.t +++ b/h2_proxy_max_temp_file_size.t @@ -38,9 +38,11 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name localhost; + http2 on; + proxy_buffer_size 4k; proxy_buffers 8 4k; @@ -66,12 +68,7 @@ http { EOF $t->write_file('1', 'X' x (1024 * 1024)); - -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_proxy_protocol.t b/h2_proxy_protocol.t --- a/h2_proxy_protocol.t +++ b/h2_proxy_protocol.t @@ -39,9 +39,11 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 proxy_protocol http2; + listen 127.0.0.1:8080 proxy_protocol; server_name localhost; + http2 on; + location /pp { set_real_ip_from 127.0.0.1/32; real_ip_header proxy_protocol; @@ -54,12 +56,7 @@ http { EOF $t->write_file('t.html', 'SEE-THIS'); - -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_proxy_request_buffering.t b/h2_proxy_request_buffering.t --- a/h2_proxy_request_buffering.t +++ b/h2_proxy_request_buffering.t @@ -40,10 +40,12 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; listen 127.0.0.1:8082; server_name localhost; + http2 on; + location / { proxy_request_buffering off; proxy_pass http://127.0.0.1:8081/; @@ -65,11 +67,7 @@ http { EOF -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_proxy_request_buffering_redirect.t b/h2_proxy_request_buffering_redirect.t --- a/h2_proxy_request_buffering_redirect.t +++ b/h2_proxy_request_buffering_redirect.t @@ -38,10 +38,11 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; listen 127.0.0.1:8081; server_name localhost; + http2 on; proxy_http_version 1.1; location / { @@ -68,11 +69,7 @@ http { EOF -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_proxy_request_buffering_ssl.t b/h2_proxy_request_buffering_ssl.t --- a/h2_proxy_request_buffering_ssl.t +++ b/h2_proxy_request_buffering_ssl.t @@ -41,9 +41,11 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name localhost; + http2 on; + location / { proxy_request_buffering off; proxy_pass https://127.0.0.1:8082; @@ -98,11 +100,7 @@ foreach my $name ('localhost') { or die "Can't create certificate for $name: $!\n"; } -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_proxy_ssl.t b/h2_proxy_ssl.t --- a/h2_proxy_ssl.t +++ b/h2_proxy_ssl.t @@ -39,10 +39,12 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; listen 127.0.0.1:8081 ssl; server_name localhost; + http2 on; + ssl_certificate_key localhost.key; ssl_certificate localhost.crt; @@ -74,12 +76,7 @@ foreach my $name ('localhost') { } $t->write_file('index.html', ''); - -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_request_body.t b/h2_request_body.t --- a/h2_request_body.t +++ b/h2_request_body.t @@ -38,10 +38,11 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; listen 127.0.0.1:8081; server_name localhost; + http2 on; error_page 400 /proxy2/t.html; location / { @@ -77,12 +78,7 @@ EOF $t->write_file('index.html', ''); $t->write_file('t.html', 'SEE-THIS'); $t->write_file('slow.html', 'SEE-THIS'); - -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_request_body_extra.t b/h2_request_body_extra.t --- a/h2_request_body_extra.t +++ b/h2_request_body_extra.t @@ -38,10 +38,11 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; listen 127.0.0.1:8081; server_name localhost; + http2 on; client_header_buffer_size 1k; client_body_buffer_size 2k; @@ -88,12 +89,7 @@ http { EOF $t->plan(50); - -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_request_body_preread.t b/h2_request_body_preread.t --- a/h2_request_body_preread.t +++ b/h2_request_body_preread.t @@ -40,10 +40,11 @@ http { limit_req_zone $binary_remote_addr zone=req:1m rate=20r/m; server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; listen 127.0.0.1:8081; server_name localhost; + http2 on; http2_body_preread_size 10; location /t { } @@ -59,9 +60,10 @@ http { } server { - listen 127.0.0.1:8082 http2; + listen 127.0.0.1:8082; server_name localhost; + http2 on; http2_body_preread_size 0; location / { @@ -76,9 +78,11 @@ http { } server { - listen 127.0.0.1:8083 http2; + listen 127.0.0.1:8083; server_name localhost; + http2 on; + location / { add_header X-Body $request_body; proxy_pass http://127.0.0.1:8081/t; @@ -89,12 +93,7 @@ http { EOF $t->write_file('t', ''); - -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_server_tokens.t b/h2_server_tokens.t --- a/h2_server_tokens.t +++ b/h2_server_tokens.t @@ -37,9 +37,11 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name localhost; + http2 on; + location /200 { return 200; } @@ -88,11 +90,7 @@ http { EOF -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_ssl_verify_client.t b/h2_ssl_verify_client.t --- a/h2_ssl_verify_client.t +++ b/h2_ssl_verify_client.t @@ -38,6 +38,7 @@ events { http { %%TEST_GLOBALS_HTTP%% + http2 on; ssl_certificate_key localhost.key; ssl_certificate localhost.crt; @@ -46,7 +47,7 @@ http { add_header X-Verify $ssl_client_verify; server { - listen 127.0.0.1:8080 ssl http2; + listen 127.0.0.1:8080 ssl; server_name localhost; ssl_client_certificate client.crt; @@ -55,7 +56,7 @@ http { } server { - listen 127.0.0.1:8080 ssl http2; + listen 127.0.0.1:8080 ssl; server_name example.com; location / { } @@ -84,9 +85,7 @@ foreach my $name ('localhost', 'client') $t->write_file('t', 'SEE-THIS'); -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; my $s = get_ssl_socket(); plan(skip_all => 'no alpn') unless $s->alpn_selected(); diff --git a/h2_trailers.t b/h2_trailers.t --- a/h2_trailers.t +++ b/h2_trailers.t @@ -37,9 +37,11 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name localhost; + http2 on; + location / { add_trailer X-Var $host; } @@ -60,12 +62,7 @@ EOF $t->write_file('index.html', 'SEE-THIS'); $t->write_file('empty', ''); $t->write_file('continuation', 'SEE-THIS'); - -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h2_variables.t b/h2_variables.t --- a/h2_variables.t +++ b/h2_variables.t @@ -37,9 +37,11 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name localhost; + http2 on; + location /h2 { return 200 $http2; } @@ -60,11 +62,7 @@ http { EOF -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/h3_server_name.t b/h3_server_name.t --- a/h3_server_name.t +++ b/h3_server_name.t @@ -44,10 +44,12 @@ http { ssl_certificate localhost.crt; server { - listen 127.0.0.1:8443 ssl http2; + listen 127.0.0.1:8443 ssl; listen 127.0.0.1:%%PORT_8980_UDP%% quic; server_name ~^(?P.+)\.example\.com$; + http2 on; + location / { return 200 $name; } @@ -74,11 +76,7 @@ foreach my $name ('localhost') { or die "Can't create certificate for $name: $!\n"; } -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/proxy_ssl_conf_command.t b/proxy_ssl_conf_command.t --- a/proxy_ssl_conf_command.t +++ b/proxy_ssl_conf_command.t @@ -72,9 +72,11 @@ http { server { listen 127.0.0.1:8081 ssl; - listen 127.0.0.1:8082 ssl http2; + listen 127.0.0.1:8082 ssl; server_name localhost; + http2 on; + ssl_certificate localhost.crt; ssl_certificate_key localhost.key; ssl_verify_client optional_no_ca; @@ -106,12 +108,7 @@ foreach my $name ('localhost', 'override } $t->write_file('index.html', ''); - -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### diff --git a/worker_shutdown_timeout_h2.t b/worker_shutdown_timeout_h2.t --- a/worker_shutdown_timeout_h2.t +++ b/worker_shutdown_timeout_h2.t @@ -39,9 +39,11 @@ http { %%TEST_GLOBALS_HTTP%% server { - listen 127.0.0.1:8080 http2; + listen 127.0.0.1:8080; server_name localhost; + http2 on; + location / { proxy_pass http://127.0.0.1:8081; proxy_read_timeout 5s; @@ -51,13 +53,7 @@ http { EOF $t->run_daemon(\&http_silent_daemon); - -# suppress deprecation warning - -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; - $t->waitforsocket('127.0.0.1:' . port(8081)); ###############################################################################