diff 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
line wrap: on
line diff
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -2433,8 +2433,13 @@ ngx_http_fastcgi_pass(ngx_conf_t *cf, ng
     }
 
     clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
+
     clcf->handler = ngx_http_fastcgi_handler;
 
+    if (clcf->name.data[clcf->name.len - 1] == '/') {
+        clcf->auto_redirect = 1;
+    }
+
     value = cf->args->elts;
 
     url = &value[1];
@@ -2470,10 +2475,6 @@ ngx_http_fastcgi_pass(ngx_conf_t *cf, ng
         return NGX_CONF_ERROR;
     }
 
-    if (clcf->name.data[clcf->name.len - 1] == '/') {
-        clcf->auto_redirect = 1;
-    }
-
     return NGX_CONF_OK;
 }