Mercurial > hg > nginx-tests
comparison http_absolute_redirect.t @ 1153:818fbc9d1c29
Tests: check Location EoLs in http_absolute_redirect.t.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 24 Mar 2017 19:29:02 +0300 |
parents | ccf134a800ae |
children | 2c120aea4362 |
comparison
equal
deleted
inserted
replaced
1152:8241ebbe753d | 1153:818fbc9d1c29 |
---|---|
86 | 86 |
87 ############################################################################### | 87 ############################################################################### |
88 | 88 |
89 my $p = port(8080); | 89 my $p = port(8080); |
90 | 90 |
91 like(get('on', '/dir'), qr!Location: http://on:$p/dir/!, 'directory'); | 91 like(get('on', '/dir'), qr!Location: http://on:$p/dir/\x0d?$!m, 'directory'); |
92 like(get('on', '/i/dir'), qr!Location: http://on:$p/i/dir/!, 'directory alias'); | 92 like(get('on', '/i/dir'), qr!Location: http://on:$p/i/dir/\x0d?$!m, |
93 like(get('on', '/auto'), qr!Location: http://on:$p/auto/!, 'auto'); | 93 'directory alias'); |
94 like(get('on', '/return301'), qr!Location: http://on:$p/redirect!, 'return'); | 94 like(get('on', '/auto'), qr!Location: http://on:$p/auto/\x0d?$!m, 'auto'); |
95 like(get('on', '/return301'), qr!Location: http://on:$p/redirect\x0d?$!m, | |
96 'return'); | |
95 | 97 |
96 like(get('off', '/dir'), qr!Location: /dir/!, 'off directory'); | 98 like(get('off', '/dir'), qr!Location: /dir/\x0d?$!m, 'off directory'); |
97 like(get('off', '/i/dir'), qr!Location: /i/dir/!, 'off directory alias'); | 99 like(get('off', '/i/dir'), qr!Location: /i/dir/\x0d?$!m, 'off directory alias'); |
98 like(get('off', '/auto'), qr!Location: /auto/!, 'off auto'); | 100 like(get('off', '/auto'), qr!Location: /auto/\x0d?$!m, 'off auto'); |
99 like(get('off', '/return301'), qr!Location: /redirect!, 'off return'); | 101 like(get('off', '/return301'), qr!Location: /redirect\x0d?$!m, 'off return'); |
100 | 102 |
101 ############################################################################### | 103 ############################################################################### |
102 | 104 |
103 sub get { | 105 sub get { |
104 my ($host, $uri) = @_; | 106 my ($host, $uri) = @_; |