diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2009-07-20 11:44:38 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2009-07-20 11:44:38 +0000 |
| commit | 5639272d4717a921ab080cdd1bf02fad956dcc77 (patch) | |
| tree | 8311b3024aa4c19c4ee12ef99bbaa0682b46609d /src/http/modules/ngx_http_fastcgi_module.c | |
| parent | 193f9f3b148f5f84f4fc9c8e09601f2c768bdfb0 (diff) | |
| download | nginx-5639272d4717a921ab080cdd1bf02fad956dcc77.tar.gz nginx-5639272d4717a921ab080cdd1bf02fad956dcc77.tar.bz2 | |
do auto redirect for proxy_pass/fastcgi_pass with variables
Diffstat (limited to 'src/http/modules/ngx_http_fastcgi_module.c')
| -rw-r--r-- | src/http/modules/ngx_http_fastcgi_module.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c index abf02720a..36b34a084 100644 --- 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, ngx_command_t *cmd, void *conf) } 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, ngx_command_t *cmd, void *conf) return NGX_CONF_ERROR; } - if (clcf->name.data[clcf->name.len - 1] == '/') { - clcf->auto_redirect = 1; - } - return NGX_CONF_OK; } |
