aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_fastcgi_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_fastcgi_module.c')
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index 2ab40fbfd..8520c0066 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -2697,17 +2697,20 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
return NGX_CONF_ERROR;
}
- if (conf->upstream.upstream == NULL && conf->fastcgi_lengths == NULL) {
+ clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
+
+ if (clcf->noname
+ && conf->upstream.upstream == NULL && conf->fastcgi_lengths == NULL)
+ {
conf->upstream.upstream = prev->upstream.upstream;
conf->fastcgi_lengths = prev->fastcgi_lengths;
conf->fastcgi_values = prev->fastcgi_values;
}
- if (conf->upstream.upstream || conf->fastcgi_lengths) {
- clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
- if (clcf->handler == NULL && clcf->lmt_excpt) {
- clcf->handler = ngx_http_fastcgi_handler;
- }
+ if (clcf->lmt_excpt && clcf->handler == NULL
+ && (conf->upstream.upstream || conf->fastcgi_lengths))
+ {
+ clcf->handler = ngx_http_fastcgi_handler;
}
#if (NGX_PCRE)