comparison proxy_if.t @ 514:42d447013553

Tests: proxy_if.t TODOs adjusted.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 12 Dec 2014 20:28:59 +0300
parents 4892d701d558
children ee7a6a144437
comparison
equal deleted inserted replaced
513:1a73389a19c4 514:42d447013553
42 42
43 location / { 43 location / {
44 proxy_pass http://127.0.0.1:8081/; 44 proxy_pass http://127.0.0.1:8081/;
45 } 45 }
46 46
47 # request will be sent to backend without uri changed 47 # request was sent to backend without uri changed
48 # to '/' due to if 48 # to '/' due to if
49 49
50 location /proxy-pass-uri { 50 location /proxy-pass-uri {
51 proxy_pass http://127.0.0.1:8081/replacement; 51 proxy_pass http://127.0.0.1:8081/replacement;
52 52
62 } 62 }
63 } 63 }
64 } 64 }
65 65
66 # same as the above, but there is a special handling 66 # same as the above, but there is a special handling
67 # in configuration merge; it may do wrong things though 67 # in configuration merge; it used to do wrong things with
68 # nested locations though
68 69
69 location /proxy-pass-uri-lmt { 70 location /proxy-pass-uri-lmt {
70 proxy_pass http://127.0.0.1:8081/replacement; 71 proxy_pass http://127.0.0.1:8081/replacement;
71 72
72 limit_except POST { 73 limit_except POST {
180 181
181 like(http_get('/proxy-pass-uri'), qr!uri:/replacement$!, 182 like(http_get('/proxy-pass-uri'), qr!uri:/replacement$!,
182 'proxy_pass uri changed'); 183 'proxy_pass uri changed');
183 184
184 TODO: { 185 TODO: {
185 local $TODO = 'not yet'; 186 local $TODO = 'not yet' unless $t->has_version('1.7.9');
186 187
187 # due to missing information about an original location where 188 # due to missing information about an original location where
188 # proxy_pass was specified, this used to pass request with 189 # proxy_pass was specified, this used to pass request with
189 # original unmodified uri 190 # original unmodified uri
190 191
202 203
203 like(http_get('/proxy-pass-uri-lmt'), qr!uri:/replacement$!, 204 like(http_get('/proxy-pass-uri-lmt'), qr!uri:/replacement$!,
204 'proxy_pass uri and limit_except'); 205 'proxy_pass uri and limit_except');
205 206
206 TODO: { 207 TODO: {
207 local $TODO = 'not yet'; 208 local $TODO = 'not yet' unless $t->has_version('1.7.9');
208 209
209 # special handling of limit_except results in wrong handling 210 # special handling of limit_except resulted in wrong handling
210 # of requests in nested locations 211 # of requests in nested locations
211 212
212 like(http_get('/proxy-pass-uri-lmt/inner'), qr!404 Not Found!, 213 like(http_get('/proxy-pass-uri-lmt/inner'), qr!404 Not Found!,
213 'proxy_pass uri and limit_except, inner'); 214 'proxy_pass uri and limit_except, inner');
214 215
230 231
231 like(http_get('/variables'), qr!uri:/outer!, 232 like(http_get('/variables'), qr!uri:/outer!,
232 'proxy_pass variables'); 233 'proxy_pass variables');
233 234
234 TODO: { 235 TODO: {
235 local $TODO = 'not yet'; 236 local $TODO = 'not yet' unless $t->has_version('1.7.9');
236 237
237 like(http_get('/variables?if=1'), qr!uri:/variables!, 238 like(http_get('/variables?if=1'), qr!uri:/variables!,
238 'proxy_pass variables if'); 239 'proxy_pass variables if');
239 like(http_get('/variables/inner'), qr!uri:/variables/inner!, 240 like(http_get('/variables/inner'), qr!uri:/variables/inner!,
240 'proxy_pass variables nested'); 241 'proxy_pass variables nested');
249 'proxy_pass ssl'); 250 'proxy_pass ssl');
250 like(http_get('/ssl?if=1'), qr!uri:/outer!, 251 like(http_get('/ssl?if=1'), qr!uri:/outer!,
251 'proxy_pass ssl inside if'); 252 'proxy_pass ssl inside if');
252 253
253 TODO: { 254 TODO: {
254 local $TODO = 'not yet'; 255 local $TODO = 'not yet' unless $t->has_version('1.7.9');
255 256
256 like(http_get('/ssl/inner'), qr!uri:/ssl/inner!, 257 like(http_get('/ssl/inner'), qr!uri:/ssl/inner!,
257 'proxy_pass nossl inside ssl'); 258 'proxy_pass nossl inside ssl');
258 259
259 } 260 }