Mercurial > hg > nginx-tests
comparison stream_geoip.t @ 1235:3fc6817cd84a
Tests: explicit peer port in stream tests now required.
Notably, this eliminates extra port acquire for the default
port number in cases when it was not actually used.
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Thu, 26 Oct 2017 16:36:13 +0300 |
parents | cf14cfe9ec8c |
children | f3ba4c74de31 |
comparison
equal
deleted
inserted
replaced
1234:0defcc1c87ab | 1235:3fc6817cd84a |
---|---|
176 ############################################################################### | 176 ############################################################################### |
177 | 177 |
178 sub stream_pp { | 178 sub stream_pp { |
179 my ($ip) = @_; | 179 my ($ip) = @_; |
180 my $type = ($ip =~ ':' ? 'TCP6' : 'TCP4'); | 180 my $type = ($ip =~ ':' ? 'TCP6' : 'TCP4'); |
181 return stream()->io("PROXY $type $ip 127.0.0.1 8080 8080${CRLF}"); | 181 return stream('127.0.0.1:' . port(8080)) |
182 ->io("PROXY $type $ip 127.0.0.1 8080 8080${CRLF}"); | |
182 } | 183 } |
183 | 184 |
184 sub pack_node { | 185 sub pack_node { |
185 substr pack('V', shift), 0, 3; | 186 substr pack('V', shift), 0, 3; |
186 } | 187 } |