diff 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
line wrap: on
line diff
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -2438,8 +2438,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];
@@ -2475,10 +2480,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;
 }