aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_scgi_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_scgi_module.c')
-rw-r--r--src/http/modules/ngx_http_scgi_module.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_scgi_module.c b/src/http/modules/ngx_http_scgi_module.c
index 515b4aed8..d831e27c2 100644
--- a/src/http/modules/ngx_http_scgi_module.c
+++ b/src/http/modules/ngx_http_scgi_module.c
@@ -1053,6 +1053,7 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_keyval_t *src;
ngx_hash_key_t *hk;
ngx_hash_init_t hash;
+ ngx_http_core_loc_conf_t *clcf;
ngx_http_script_compile_t sc;
ngx_http_script_copy_code_t *copy;
@@ -1285,6 +1286,13 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
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 (conf->params_source == NULL) {
conf->flushes = prev->flushes;
conf->params_len = prev->params_len;