Mercurial > hg > nginx-tests
comparison proxy_upgrade.t @ 1509:1603f2bad385
Tests: $sent_http_connection tests.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 16 Sep 2019 19:13:18 +0300 |
parents | 97c8280de681 |
children |
comparison
equal
deleted
inserted
replaced
1508:1a409a166420 | 1509:1603f2bad385 |
---|---|
38 } | 38 } |
39 | 39 |
40 http { | 40 http { |
41 %%TEST_GLOBALS_HTTP%% | 41 %%TEST_GLOBALS_HTTP%% |
42 | 42 |
43 log_format test "$bytes_sent $body_bytes_sent"; | 43 log_format test "$bytes_sent $body_bytes_sent $sent_http_connection"; |
44 access_log %%TESTDIR%%/cc.log test; | 44 access_log %%TESTDIR%%/cc.log test; |
45 | 45 |
46 server { | 46 server { |
47 listen 127.0.0.1:8080; | 47 listen 127.0.0.1:8080; |
48 server_name localhost; | 48 server_name localhost; |
145 | 145 |
146 $t->stop(); | 146 $t->stop(); |
147 | 147 |
148 open my $f, '<', "$d/cc.log" or die "Can't open cc.log: $!"; | 148 open my $f, '<', "$d/cc.log" or die "Can't open cc.log: $!"; |
149 | 149 |
150 is($f->getline(), shift (@r) . " 540793\n", 'log - bytes'); | 150 is($f->getline(), shift (@r) . " 540793 upgrade\n", 'log - bytes'); |
151 is($f->getline(), shift (@r) . " 22\n", 'log - bytes pipelined'); | 151 is($f->getline(), shift (@r) . " 22 upgrade\n", 'log - bytes pipelined'); |
152 like($f->getline(), qr/\d+ 0\n/, 'log - bytes noupgrade'); | 152 like($f->getline(), qr/\d+ 0 /, 'log - bytes noupgrade'); |
153 | 153 |
154 ############################################################################### | 154 ############################################################################### |
155 | 155 |
156 sub upgrade_connect { | 156 sub upgrade_connect { |
157 my (%opts) = @_; | 157 my (%opts) = @_; |