Mercurial > hg > nginx-tests
comparison realip_remote_port.t @ 1251:766bcbb632ee
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 24 Nov 2017 19:58:40 +0300 |
parents | e19d41512e22 |
children |
comparison
equal
deleted
inserted
replaced
1250:b708848eb49a | 1251:766bcbb632ee |
---|---|
51 | 51 |
52 EOF | 52 EOF |
53 | 53 |
54 $t->write_file('index.html', ''); | 54 $t->write_file('index.html', ''); |
55 $t->write_file('1', ''); | 55 $t->write_file('1', ''); |
56 $t->try_run('no realip_remote_port'); | 56 $t->run(); |
57 | 57 |
58 plan(skip_all => 'no 127.0.0.1 on host') | 58 plan(skip_all => 'no 127.0.0.1 on host') |
59 if http_get('/') !~ /X-IP: 127.0.0.1/m; | 59 if http_get('/') !~ /X-IP: 127.0.0.1/m; |
60 | 60 |
61 $t->plan(4); | 61 $t->plan(4); |
69 like($data, qr/X-Real-Port: $sp/, 'request redirect'); | 69 like($data, qr/X-Real-Port: $sp/, 'request redirect'); |
70 | 70 |
71 ($sp, $data) = http_sp_xff('/1', '127.0.0.1:123'); | 71 ($sp, $data) = http_sp_xff('/1', '127.0.0.1:123'); |
72 like($data, qr/X-Real-Port: $sp/, 'realip'); | 72 like($data, qr/X-Real-Port: $sp/, 'realip'); |
73 | 73 |
74 TODO: { | |
75 local $TODO = 'not yet' unless $t->has_version('1.11.5'); | |
76 | |
77 ($sp, $data) = http_sp_xff('/', '127.0.0.1:123'); | 74 ($sp, $data) = http_sp_xff('/', '127.0.0.1:123'); |
78 like($data, qr/X-Real-Port: $sp/, 'realip redirect'); | 75 like($data, qr/X-Real-Port: $sp/, 'realip redirect'); |
79 | |
80 } | |
81 | 76 |
82 ############################################################################### | 77 ############################################################################### |
83 | 78 |
84 sub http_sp_get { | 79 sub http_sp_get { |
85 my $s = http_get(shift, start => 1); | 80 my $s = http_get(shift, start => 1); |