aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_uwsgi_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_uwsgi_module.c')
-rw-r--r--src/http/modules/ngx_http_uwsgi_module.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/http/modules/ngx_http_uwsgi_module.c b/src/http/modules/ngx_http_uwsgi_module.c
index 0dbcbf16a..ae069eb83 100644
--- a/src/http/modules/ngx_http_uwsgi_module.c
+++ b/src/http/modules/ngx_http_uwsgi_module.c
@@ -1698,7 +1698,11 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
return NGX_CONF_ERROR;
}
- if (conf->upstream.upstream == NULL && conf->uwsgi_lengths == NULL) {
+ clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
+
+ if (clcf->noname
+ && conf->upstream.upstream == NULL && conf->uwsgi_lengths == NULL)
+ {
conf->upstream.upstream = prev->upstream.upstream;
conf->uwsgi_lengths = prev->uwsgi_lengths;
@@ -1709,11 +1713,10 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
#endif
}
- if (conf->upstream.upstream || conf->uwsgi_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_uwsgi_handler;
- }
+ if (clcf->lmt_excpt && clcf->handler == NULL
+ && (conf->upstream.upstream || conf->uwsgi_lengths))
+ {
+ clcf->handler = ngx_http_uwsgi_handler;
}
ngx_conf_merge_uint_value(conf->modifier1, prev->modifier1, 0);