Mercurial > hg > nginx-tests
comparison stream_status_variable.t @ 1229:6979619de0e3
Tests: added stream $status test with invalid PROXY header.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 13 Oct 2017 18:14:59 +0300 |
parents | 31045e639732 |
children | 5ceb07e20515 |
comparison
equal
deleted
inserted
replaced
1228:31045e639732 | 1229:6979619de0e3 |
---|---|
75 } | 75 } |
76 | 76 |
77 server { | 77 server { |
78 listen 127.0.0.1:8086 proxy_protocol; | 78 listen 127.0.0.1:8086 proxy_protocol; |
79 return SEE-THIS; | 79 return SEE-THIS; |
80 access_log %%TESTDIR%%/400.log status; | |
80 } | 81 } |
81 } | 82 } |
82 | 83 |
83 EOF | 84 EOF |
84 | 85 |
85 $t->try_run('no stream access_log')->plan(5); | 86 $t->try_run('no stream access_log')->plan(6); |
86 | 87 |
87 ############################################################################### | 88 ############################################################################### |
88 | 89 |
89 stream('127.0.0.1:' . port(8080))->read(); | 90 stream('127.0.0.1:' . port(8080))->read(); |
90 stream('127.0.0.1:' . port(8081))->read(); | 91 stream('127.0.0.1:' . port(8081))->read(); |
96 undef $s; | 97 undef $s; |
97 | 98 |
98 $t->stop(); | 99 $t->stop(); |
99 | 100 |
100 is($t->read_file('200.log'), "200\n", 'stream status 200'); | 101 is($t->read_file('200.log'), "200\n", 'stream status 200'); |
102 is($t->read_file('400.log'), "400\n", 'stream status 400'); | |
101 is($t->read_file('403.log'), "403\n", 'stream status 403'); | 103 is($t->read_file('403.log'), "403\n", 'stream status 403'); |
102 is($t->read_file('500.log'), "500\n", 'stream status 500'); | 104 is($t->read_file('500.log'), "500\n", 'stream status 500'); |
103 is($t->read_file('502.log'), "502\n", 'stream status 502'); | 105 is($t->read_file('502.log'), "502\n", 'stream status 502'); |
104 is($t->read_file('503.log'), "503\n200\n", 'stream status 503'); | 106 is($t->read_file('503.log'), "503\n200\n", 'stream status 503'); |
105 | 107 |