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)
return NGX_CONF_ERROR;
}
- if (conf->upstream.upstream == NULL && conf->proxy_lengths == NULL) {
+ clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
+
+ if (clcf->noname
+ && conf->upstream.upstream == NULL && conf->proxy_lengths == NULL)
+ {
conf->upstream.upstream = prev->upstream.upstream;
conf->vars = prev->vars;
#endif
}
- if (conf->upstream.upstream || conf->proxy_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_proxy_handler;
- conf->location = prev->location;
- }
+ if (clcf->lmt_excpt && clcf->handler == NULL
+ && (conf->upstream.upstream || conf->proxy_lengths))
+ {
+ clcf->handler = ngx_http_proxy_handler;
+ conf->location = prev->location;
}
if (conf->body_source.data == NULL) {
return NGX_CONF_ERROR;
}
- if (conf->upstream.upstream == NULL && conf->scgi_lengths == NULL) {
+ clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
+
+ if (clcf->noname
+ && conf->upstream.upstream == NULL && conf->scgi_lengths == NULL)
+ {
conf->upstream.upstream = prev->upstream.upstream;
conf->scgi_lengths = prev->scgi_lengths;
conf->scgi_values = prev->scgi_values;
}
- if (conf->upstream.upstream || conf->scgi_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_scgi_handler;
- }
+ if (clcf->lmt_excpt && clcf->handler == NULL
+ && (conf->upstream.upstream || conf->scgi_lengths))
+ {
+ clcf->handler = ngx_http_scgi_handler;
}
if (conf->params_source == NULL) {
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;
#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);