comparison src/http/modules/ngx_http_fastcgi_module.c @ 3425:0189a8f4c7c3 stable-0.7

merge r2990, r3324, r3384, r3419: various proxy/FastCGI fixes: *) do auto redirect for proxy_pass/fastcgi_pass with variables *) allow "proxy_pass http://$backend" without URI part *) add conf/fastcgi.conf *) delete u->cleanup mark, this fixes large values in $upstream_response_time, the bug had been introduced in r3246
author Igor Sysoev <igor@sysoev.ru>
date Mon, 01 Feb 2010 14:01:24 +0000
parents 61962127b166
children 3354dfba9da4
comparison
equal deleted inserted replaced
3424:c6ecb3fe577b 3425:0189a8f4c7c3
2431 if (flcf->upstream.upstream || flcf->fastcgi_lengths) { 2431 if (flcf->upstream.upstream || flcf->fastcgi_lengths) {
2432 return "is duplicate"; 2432 return "is duplicate";
2433 } 2433 }
2434 2434
2435 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); 2435 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
2436
2436 clcf->handler = ngx_http_fastcgi_handler; 2437 clcf->handler = ngx_http_fastcgi_handler;
2438
2439 if (clcf->name.data[clcf->name.len - 1] == '/') {
2440 clcf->auto_redirect = 1;
2441 }
2437 2442
2438 value = cf->args->elts; 2443 value = cf->args->elts;
2439 2444
2440 url = &value[1]; 2445 url = &value[1];
2441 2446
2466 u.no_resolve = 1; 2471 u.no_resolve = 1;
2467 2472
2468 flcf->upstream.upstream = ngx_http_upstream_add(cf, &u, 0); 2473 flcf->upstream.upstream = ngx_http_upstream_add(cf, &u, 0);
2469 if (flcf->upstream.upstream == NULL) { 2474 if (flcf->upstream.upstream == NULL) {
2470 return NGX_CONF_ERROR; 2475 return NGX_CONF_ERROR;
2471 }
2472
2473 if (clcf->name.data[clcf->name.len - 1] == '/') {
2474 clcf->auto_redirect = 1;
2475 } 2476 }
2476 2477
2477 return NGX_CONF_OK; 2478 return NGX_CONF_OK;
2478 } 2479 }
2479 2480