Mercurial > hg > nginx-tests
comparison proxy_xar.t @ 397:847ea345becb
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 05 May 2014 11:46:01 +0400 |
parents | 0726521e42f3 |
children | eaf287a41f08 |
comparison
equal
deleted
inserted
replaced
396:5eb0df61f371 | 397:847ea345becb |
---|---|
82 like($r, qr/^Cache-Control: no-cache/m, 'Cache-Control preserved'); | 82 like($r, qr/^Cache-Control: no-cache/m, 'Cache-Control preserved'); |
83 like($r, qr/^Expires: fake/m, 'Expires preserved'); | 83 like($r, qr/^Expires: fake/m, 'Expires preserved'); |
84 like($r, qr/^Accept-Ranges: parrots/m, 'Accept-Ranges preserved'); | 84 like($r, qr/^Accept-Ranges: parrots/m, 'Accept-Ranges preserved'); |
85 unlike($r, qr/^Something/m, 'other headers stripped'); | 85 unlike($r, qr/^Something/m, 'other headers stripped'); |
86 | 86 |
87 TODO: { | 87 # escaped characters |
88 local $TODO = 'escaped characters' unless $t->has_version('1.5.9'); | |
89 | 88 |
90 like(http_get('/proxy?xar=/foo?bar'), qr/200 OK.*xar: \/foo\?bar/s, | 89 like(http_get('/proxy?xar=/foo?bar'), qr/200 OK.*xar: \/foo\?bar/s, |
91 'X-Accel-Redirect value unchanged'); | 90 'X-Accel-Redirect value unchanged'); |
92 unlike(http_get('/proxy?xar=..'), qr/200 OK/, | 91 unlike(http_get('/proxy?xar=..'), qr/200 OK/, |
93 'X-Accel-Redirect unsafe dotdot'); | 92 'X-Accel-Redirect unsafe dotdot'); |
98 unlike(http_get('/proxy?xar=/foo/.%2e'), qr/200 OK/, | 97 unlike(http_get('/proxy?xar=/foo/.%2e'), qr/200 OK/, |
99 'X-Accel-Redirect unsafe unescaped'); | 98 'X-Accel-Redirect unsafe unescaped'); |
100 like(http_get('/proxy?xar=/foo%20bar'), qr/uri: \/foo bar/, | 99 like(http_get('/proxy?xar=/foo%20bar'), qr/uri: \/foo bar/, |
101 'X-Accel-Redirect unescaped'); | 100 'X-Accel-Redirect unescaped'); |
102 | 101 |
103 } | |
104 | |
105 ############################################################################### | 102 ############################################################################### |