Mercurial > hg > nginx
comparison src/http/modules/ngx_http_fastcgi_module.c @ 2989:dff9764eaca2
do auto redirect for proxy_pass/fastcgi_pass with variables
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 20 Jul 2009 11:44:38 +0000 |
parents | 55ceaef03d34 |
children | 95972b9e790b |
comparison
equal
deleted
inserted
replaced
2988:b535ece5e350 | 2989:dff9764eaca2 |
---|---|
2436 if (flcf->upstream.upstream || flcf->fastcgi_lengths) { | 2436 if (flcf->upstream.upstream || flcf->fastcgi_lengths) { |
2437 return "is duplicate"; | 2437 return "is duplicate"; |
2438 } | 2438 } |
2439 | 2439 |
2440 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); | 2440 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); |
2441 | |
2441 clcf->handler = ngx_http_fastcgi_handler; | 2442 clcf->handler = ngx_http_fastcgi_handler; |
2443 | |
2444 if (clcf->name.data[clcf->name.len - 1] == '/') { | |
2445 clcf->auto_redirect = 1; | |
2446 } | |
2442 | 2447 |
2443 value = cf->args->elts; | 2448 value = cf->args->elts; |
2444 | 2449 |
2445 url = &value[1]; | 2450 url = &value[1]; |
2446 | 2451 |
2471 u.no_resolve = 1; | 2476 u.no_resolve = 1; |
2472 | 2477 |
2473 flcf->upstream.upstream = ngx_http_upstream_add(cf, &u, 0); | 2478 flcf->upstream.upstream = ngx_http_upstream_add(cf, &u, 0); |
2474 if (flcf->upstream.upstream == NULL) { | 2479 if (flcf->upstream.upstream == NULL) { |
2475 return NGX_CONF_ERROR; | 2480 return NGX_CONF_ERROR; |
2476 } | |
2477 | |
2478 if (clcf->name.data[clcf->name.len - 1] == '/') { | |
2479 clcf->auto_redirect = 1; | |
2480 } | 2481 } |
2481 | 2482 |
2482 return NGX_CONF_OK; | 2483 return NGX_CONF_OK; |
2483 } | 2484 } |
2484 | 2485 |