annotate h2_ssl_proxy_cache.t @ 1021:ebdf239722b9

Tests: relaxed proxy_cache_lock.t nolock tests to fix on Solaris. Assumed that the order of responses being arrived in nolock case may be ignored. An important part of such case is that the only last response should be cached.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 02 Sep 2016 12:17:35 +0300
parents 196d33c2bb45
children 45c80276d691
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
986
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
1 #!/usr/bin/perl
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
2
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
3 # (C) Sergey Kandaurov
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
4 # (C) Nginx, Inc.
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
5
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
6 # Tests for HTTP/2 protocol with ssl and http proxy cache.
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
7
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
8 ###############################################################################
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
9
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
10 use warnings;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
11 use strict;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
12
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
13 use Test::More;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
14
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
15 BEGIN { use FindBin; chdir($FindBin::Bin); }
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
16
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
17 use lib 'lib';
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
18 use Test::Nginx;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
19 use Test::Nginx::HTTP2;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
20
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
21 ###############################################################################
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
22
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
23 select STDERR; $| = 1;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
24 select STDOUT; $| = 1;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
25
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
26 eval { require IO::Socket::SSL; };
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
27 plan(skip_all => 'IO::Socket::SSL not installed') if $@;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
28
1020
196d33c2bb45 Tests: removed TODO and try_run() checks for legacy versions.
Andrey Zelenkov <zelenkov@nginx.com>
parents: 998
diff changeset
29 my $t = Test::Nginx->new()->has(qw/http http_ssl http_v2 proxy cache/)
986
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
30 ->has_daemon('openssl');
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
31
997
3c5d3b384d3f Tests: adjusted TODOs for HTTP/2 fixes committed in 1.11.3.
Sergey Kandaurov <pluknet@nginx.com>
parents: 986
diff changeset
32 $t->todo_alerts() unless $t->has_version('1.11.3');
986
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
33
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
34 $t->write_file_expand('nginx.conf', <<'EOF');
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
35
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
36 %%TEST_GLOBALS%%
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
37
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
38 daemon off;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
39
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
40 events {
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
41 }
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
42
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
43 http {
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
44 %%TEST_GLOBALS_HTTP%%
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
45
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
46 proxy_cache_path %%TESTDIR%%/cache keys_zone=NAME:1m;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
47
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
48 server {
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
49 listen 127.0.0.1:8080 http2 ssl sndbuf=32k;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
50 server_name localhost;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
51
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
52 ssl_certificate_key localhost.key;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
53 ssl_certificate localhost.crt;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
54
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
55 send_timeout 1s;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
56
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
57 location / {
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
58 proxy_pass http://127.0.0.1:8081;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
59 proxy_cache NAME;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
60 }
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
61 }
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
62
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
63 server {
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
64 listen 127.0.0.1:8081 sndbuf=64k;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
65 server_name localhost;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
66
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
67 location / { }
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
68 }
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
69 }
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
70
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
71 EOF
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
72
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
73 $t->write_file('openssl.conf', <<EOF);
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
74 [ req ]
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
75 default_bits = 2048
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
76 encrypt_key = no
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
77 distinguished_name = req_distinguished_name
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
78 [ req_distinguished_name ]
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
79 EOF
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
80
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
81 my $d = $t->testdir();
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
82
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
83 foreach my $name ('localhost') {
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
84 system('openssl req -x509 -new '
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
85 . "-config '$d/openssl.conf' -subj '/CN=$name/' "
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
86 . "-out '$d/$name.crt' -keyout '$d/$name.key' "
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
87 . ">>$d/openssl.out 2>&1") == 0
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
88 or die "Can't create certificate for $name: $!\n";
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
89 }
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
90
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
91 $t->write_file('tbig.html',
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
92 join('', map { sprintf "XX%06dXX", $_ } (1 .. 500000)));
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
93
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
94 open OLDERR, ">&", \*STDERR; close STDERR;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
95 $t->run();
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
96 open STDERR, ">&", \*OLDERR;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
97
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
98 plan(skip_all => 'no ALPN/NPN negotiation') unless defined getconn(port(0));
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
99 $t->plan(1);
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
100
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
101 ###############################################################################
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
102
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
103 # client cancels stream with a cacheable request sent to upstream causing alert
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
104
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
105 my $s = getconn(port(0));
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
106 ok($s, 'ssl connection');
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
107
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
108 my $sid = $s->new_stream();
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
109 $s->h2_rst($sid, 8);
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
110
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
111 # large response may stuck in SSL buffer and won't be sent producing alert
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
112
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
113 my $s2 = getconn(port(0));
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
114 $sid = $s2->new_stream({ path => '/tbig.html' });
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
115 $s2->h2_window(2**30, $sid);
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
116 $s2->h2_window(2**30);
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
117
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
118 select undef, undef, undef, 0.2;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
119
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
120 $t->stop();
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
121
998
79ba0a5be312 Tests: TODO h2_ssl_proxy_cache.t alerts seen with "aio_write".
Sergey Kandaurov <pluknet@nginx.com>
parents: 997
diff changeset
122 # "aio_write" is used to produce "open socket ... left in connection" alerts.
79ba0a5be312 Tests: TODO h2_ssl_proxy_cache.t alerts seen with "aio_write".
Sergey Kandaurov <pluknet@nginx.com>
parents: 997
diff changeset
123
79ba0a5be312 Tests: TODO h2_ssl_proxy_cache.t alerts seen with "aio_write".
Sergey Kandaurov <pluknet@nginx.com>
parents: 997
diff changeset
124 $t->todo_alerts() if $t->read_file('nginx.conf') =~ /aio_write on/
79ba0a5be312 Tests: TODO h2_ssl_proxy_cache.t alerts seen with "aio_write".
Sergey Kandaurov <pluknet@nginx.com>
parents: 997
diff changeset
125 and $t->read_file('nginx.conf') =~ /aio threads/ and $^O eq 'linux';
79ba0a5be312 Tests: TODO h2_ssl_proxy_cache.t alerts seen with "aio_write".
Sergey Kandaurov <pluknet@nginx.com>
parents: 997
diff changeset
126
986
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
127 ###############################################################################
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
128
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
129 sub getconn {
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
130 my ($port) = @_;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
131 my $s;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
132
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
133 eval {
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
134 IO::Socket::SSL->can_alpn() or die;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
135 $s = Test::Nginx::HTTP2->new($port, SSL => 1, alpn => 'h2');
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
136 };
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
137
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
138 return $s if defined $s;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
139
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
140 eval {
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
141 IO::Socket::SSL->can_npn() or die;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
142 $s = Test::Nginx::HTTP2->new($port, SSL => 1, npn => 'h2');
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
143 };
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
144
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
145 return $s;
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
146 }
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
147
99f93be57416 Tests: various HTTP/2 tests with canceled stream.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
148 ###############################################################################