annotate quic_migration.t @ 1893:6dcf5a1df790

Tests: basic QUIC connection migration tests.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 23 May 2023 18:55:06 +0400
parents
children 8b74936ff2ac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1893
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
1 #!/usr/bin/perl
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
2
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
3 # (C) Sergey Kandaurov
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
4 # (C) Nginx, Inc.
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
5
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
6 # Tests for quic connection migration.
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
7
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
8 ###############################################################################
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
9
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
10 use warnings;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
11 use strict;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
12
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
13 use Test::More;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
14
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
15 BEGIN { use FindBin; chdir($FindBin::Bin); }
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
16
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
17 use lib 'lib';
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
18 use Test::Nginx;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
19 use Test::Nginx::HTTP3;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
20
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
21 ###############################################################################
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
22
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
23 select STDERR; $| = 1;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
24 select STDOUT; $| = 1;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
25
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
26 eval { require Crypt::Misc; die if $Crypt::Misc::VERSION < 0.067; };
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
27 plan(skip_all => 'CryptX version >= 0.067 required') if $@;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
28
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
29 plan(skip_all => '127.0.0.20 local address required')
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
30 unless defined IO::Socket::INET->new( LocalAddr => '127.0.0.20' );
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
31
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
32 my $t = Test::Nginx->new()->has(qw/http http_v3/)
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
33 ->has_daemon('openssl')->plan(2);
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
34
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
35 $t->write_file_expand('nginx.conf', <<'EOF');
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
36
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
37 %%TEST_GLOBALS%%
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
38
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
39 daemon off;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
40
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
41 events {
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
42 }
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
43
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
44 http {
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
45 %%TEST_GLOBALS_HTTP%%
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
46
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
47 ssl_certificate_key localhost.key;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
48 ssl_certificate localhost.crt;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
49
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
50 server {
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
51 listen 127.0.0.1:%%PORT_8980_UDP%% quic;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
52 server_name localhost;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
53
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
54 location / {
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
55 add_header X-IP $remote_addr;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
56 }
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
57 }
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
58 }
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
59
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
60 EOF
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
61
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
62 $t->write_file('openssl.conf', <<EOF);
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
63 [ req ]
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
64 default_bits = 2048
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
65 encrypt_key = no
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
66 distinguished_name = req_distinguished_name
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
67 [ req_distinguished_name ]
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
68 EOF
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
69
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
70 my $d = $t->testdir();
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
71
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
72 foreach my $name ('localhost') {
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
73 system('openssl req -x509 -new '
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
74 . "-config $d/openssl.conf -subj /CN=$name/ "
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
75 . "-out $d/$name.crt -keyout $d/$name.key "
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
76 . ">>$d/openssl.out 2>&1") == 0
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
77 or die "Can't create certificate for $name: $!\n";
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
78 }
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
79
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
80 $t->write_file('index.html', '');
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
81 $t->run();
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
82
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
83 ###############################################################################
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
84
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
85 # test that $remote_addr is not truncated after migration (ticket #2488),
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
86 # to test, we migrate to another address large enough in text representation,
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
87 # then send a request on the new path
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
88
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
89 my $s = Test::Nginx::HTTP3->new();
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
90 $s->new_connection_id(1, 0, "connection_id_1", "reset_token_0001");
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
91
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
92 my $frames = $s->read(all => [{ type => 'NCID' }]);
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
93 my ($frame) = grep { $_->{type} eq "NCID" } @$frames;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
94
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
95 $s->{socket} = IO::Socket::INET->new(
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
96 Proto => "udp",
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
97 LocalAddr => '127.0.0.20',
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
98 PeerAddr => '127.0.0.1:' . port(8980),
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
99 );
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
100 $s->{scid} = "connection_id_1";
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
101 $s->{dcid} = $frame->{cid};
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
102 $s->ping();
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
103
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
104 $frames = $s->read(all => [{ type => 'PATH_CHALLENGE' }]);
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
105 ($frame) = grep { $_->{type} eq "PATH_CHALLENGE" } @$frames;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
106 $s->path_response($frame->{data});
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
107
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
108 $frames = $s->read(all => [{ sid => $s->new_stream(), fin => 1 }]);
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
109 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
110 is($frame->{headers}{'x-ip'}, '127.0.0.20', 'remote addr after migration');
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
111
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
112 # test that $remote_addr is not truncated while in the process of migration;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
113 # the same but migration occurs on receiving a request stream itself,
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
114 # which is the first non-probing frame on the new path;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
115 # this might lead to $remote_addr truncation in the following order:
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
116 # - stream held original sockaddr/addr_text references on stream creation
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
117 # - values were rewritten as part of handling connection migration
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
118 # - stream was handled referencing rewritten values, with old local lengths
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
119 # sockaddr and addr_text are expected to keep copies on stream creation
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
120
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
121 $s = Test::Nginx::HTTP3->new();
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
122 $s->new_connection_id(1, 0, "connection_id_1", "reset_token_0001");
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
123
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
124 $frames = $s->read(all => [{ type => 'NCID' }]);
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
125 ($frame) = grep { $_->{type} eq "NCID" } @$frames;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
126
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
127 $s->{socket} = IO::Socket::INET->new(
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
128 Proto => "udp",
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
129 LocalAddr => '127.0.0.20',
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
130 PeerAddr => '127.0.0.1:' . port(8980),
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
131 );
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
132 $s->{scid} = "connection_id_1";
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
133 $s->{dcid} = $frame->{cid};
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
134
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
135 $frames = $s->read(all => [{ sid => $s->new_stream(), fin => 1 }]);
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
136 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
137 is($frame->{headers}{'x-ip'}, '127.0.0.1', 'remote addr on migration');
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
138
6dcf5a1df790 Tests: basic QUIC connection migration tests.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff changeset
139 ###############################################################################