Mercurial > hg > nginx-tests
comparison proxy.t @ 922:93d900bac201
Tests: added regression test for proxy with no IPv6 port specified.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 12 May 2016 13:08:43 +0300 |
parents | eca9b1d19021 |
children | 54680c434afa |
comparison
equal
deleted
inserted
replaced
921:bc9e519ab3bc | 922:93d900bac201 |
---|---|
19 ############################################################################### | 19 ############################################################################### |
20 | 20 |
21 select STDERR; $| = 1; | 21 select STDERR; $| = 1; |
22 select STDOUT; $| = 1; | 22 select STDOUT; $| = 1; |
23 | 23 |
24 my $t = Test::Nginx->new()->has(qw/http proxy/)->plan(6); | 24 my $t = Test::Nginx->new()->has(qw/http proxy/)->plan(7); |
25 | 25 |
26 $t->write_file_expand('nginx.conf', <<'EOF'); | 26 $t->write_file_expand('nginx.conf', <<'EOF'); |
27 | 27 |
28 %%TEST_GLOBALS%% | 28 %%TEST_GLOBALS%% |
29 | 29 |
68 | 68 |
69 unlike(http_head('/'), qr/SEE-THIS/, 'proxy head request'); | 69 unlike(http_head('/'), qr/SEE-THIS/, 'proxy head request'); |
70 | 70 |
71 like(http_get('/var?b=127.0.0.1:8081/'), qr/SEE-THIS/, 'proxy with variables'); | 71 like(http_get('/var?b=127.0.0.1:8081/'), qr/SEE-THIS/, 'proxy with variables'); |
72 like(http_get('/var?b=u/'), qr/SEE-THIS/, 'proxy with variables to upstream'); | 72 like(http_get('/var?b=u/'), qr/SEE-THIS/, 'proxy with variables to upstream'); |
73 | |
74 SKIP: { | |
75 skip 'no ipv6', 1 unless $t->has_module('ipv6'); | |
76 | |
77 TODO: { | |
78 todo_skip 'heap-buffer-overflow', 1 | |
79 unless $ENV{TEST_NGINX_UNSAFE} or $t->has_version('1.11.0'); | |
80 | |
81 ok(http_get("/var?b=[::]"), 'proxy with variables - no ipv6 port'); | |
82 | |
83 } | |
84 | |
85 } | |
73 | 86 |
74 my $s = http('', start => 1); | 87 my $s = http('', start => 1); |
75 | 88 |
76 sleep 3; | 89 sleep 3; |
77 | 90 |