Mercurial > hg > nginx-tests
comparison proxy_if.t @ 568:907e89fba9c3
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Sun, 03 May 2015 12:45:09 +0300 |
parents | ee7a6a144437 |
children | 355f2d5ff60f |
comparison
equal
deleted
inserted
replaced
567:22bade4c7e12 | 568:907e89fba9c3 |
---|---|
181 like(http_get('/'), qr!uri:/$!, 'proxy request'); | 181 like(http_get('/'), qr!uri:/$!, 'proxy request'); |
182 | 182 |
183 like(http_get('/proxy-pass-uri'), qr!uri:/replacement$!, | 183 like(http_get('/proxy-pass-uri'), qr!uri:/replacement$!, |
184 'proxy_pass uri changed'); | 184 'proxy_pass uri changed'); |
185 | 185 |
186 TODO: { | |
187 local $TODO = 'not yet' unless $t->has_version('1.7.9'); | |
188 | |
189 # due to missing information about an original location where | 186 # due to missing information about an original location where |
190 # proxy_pass was specified, this used to pass request with | 187 # proxy_pass was specified, this used to pass request with |
191 # original unmodified uri | 188 # original unmodified uri |
192 | 189 |
193 like(http_get('/proxy-pass-uri?if=1'), qr!uri:/replacement$!, | 190 like(http_get('/proxy-pass-uri?if=1'), qr!uri:/replacement$!, |
194 'proxy_pass uri changed in if'); | 191 'proxy_pass uri changed in if'); |
195 | |
196 } | |
197 | 192 |
198 like(http_get('/proxy-pass-uri/inner'), qr!404 Not Found!, | 193 like(http_get('/proxy-pass-uri/inner'), qr!404 Not Found!, |
199 'proxy_pass uri changed inner'); | 194 'proxy_pass uri changed inner'); |
200 like(http_get('/proxy-pass-uri/inner?if=1'), qr!404 Not Found!, | 195 like(http_get('/proxy-pass-uri/inner?if=1'), qr!404 Not Found!, |
201 'proxy_pass uri changed inner in if'); | 196 'proxy_pass uri changed inner in if'); |
203 # limit_except | 198 # limit_except |
204 | 199 |
205 like(http_get('/proxy-pass-uri-lmt'), qr!uri:/replacement$!, | 200 like(http_get('/proxy-pass-uri-lmt'), qr!uri:/replacement$!, |
206 'proxy_pass uri and limit_except'); | 201 'proxy_pass uri and limit_except'); |
207 | 202 |
208 TODO: { | |
209 local $TODO = 'not yet' unless $t->has_version('1.7.9'); | |
210 | |
211 # special handling of limit_except resulted in wrong handling | 203 # special handling of limit_except resulted in wrong handling |
212 # of requests in nested locations | 204 # of requests in nested locations |
213 | 205 |
214 like(http_get('/proxy-pass-uri-lmt/inner'), qr!404 Not Found!, | 206 like(http_get('/proxy-pass-uri-lmt/inner'), qr!404 Not Found!, |
215 'proxy_pass uri and limit_except, inner'); | 207 'proxy_pass uri and limit_except, inner'); |
216 | |
217 } | |
218 | 208 |
219 like(http_get('/proxy-pass-uri-lmt-different'), | 209 like(http_get('/proxy-pass-uri-lmt-different'), |
220 qr!uri:/proxy-pass-uri-lmt-different!, | 210 qr!uri:/proxy-pass-uri-lmt-different!, |
221 'proxy_pass and limit_except with different proxy_pass'); | 211 'proxy_pass and limit_except with different proxy_pass'); |
222 | 212 |
230 # use distinct field, and inheritance should be mutually | 220 # use distinct field, and inheritance should be mutually |
231 # exclusive, see ticket #645 | 221 # exclusive, see ticket #645 |
232 | 222 |
233 like(http_get('/variables'), qr!uri:/outer!, | 223 like(http_get('/variables'), qr!uri:/outer!, |
234 'proxy_pass variables'); | 224 'proxy_pass variables'); |
235 | |
236 TODO: { | |
237 local $TODO = 'not yet' unless $t->has_version('1.7.9'); | |
238 | |
239 like(http_get('/variables?if=1'), qr!uri:/variables!, | 225 like(http_get('/variables?if=1'), qr!uri:/variables!, |
240 'proxy_pass variables if'); | 226 'proxy_pass variables if'); |
241 like(http_get('/variables/inner'), qr!uri:/variables/inner!, | 227 like(http_get('/variables/inner'), qr!uri:/variables/inner!, |
242 'proxy_pass variables nested'); | 228 'proxy_pass variables nested'); |
243 | 229 |
244 } | |
245 | |
246 # ssl context shouldn't be inherited into nested | 230 # ssl context shouldn't be inherited into nested |
247 # locations with different proxy_pass, but should | 231 # locations with different proxy_pass, but should |
248 # be correctly inherited into if's | 232 # be correctly inherited into if's |
249 | 233 |
250 like(http_get('/ssl'), qr!uri:/outer!, | 234 like(http_get('/ssl'), qr!uri:/outer!, |
251 'proxy_pass ssl'); | 235 'proxy_pass ssl'); |
252 like(http_get('/ssl?if=1'), qr!uri:/outer!, | 236 like(http_get('/ssl?if=1'), qr!uri:/outer!, |
253 'proxy_pass ssl inside if'); | 237 'proxy_pass ssl inside if'); |
254 | |
255 TODO: { | |
256 local $TODO = 'not yet' unless $t->has_version('1.7.9'); | |
257 | |
258 like(http_get('/ssl/inner'), qr!uri:/ssl/inner!, | 238 like(http_get('/ssl/inner'), qr!uri:/ssl/inner!, |
259 'proxy_pass nossl inside ssl'); | 239 'proxy_pass nossl inside ssl'); |
260 | 240 |
261 } | 241 ############################################################################### |
262 | |
263 ############################################################################### |