aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c14
-rw-r--r--src/http/modules/ngx_http_proxy_module.c14
-rw-r--r--src/http/modules/ngx_http_scgi_module.c14
-rw-r--r--src/http/modules/ngx_http_uwsgi_module.c14
4 files changed, 56 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index 62502b04f..f6a8c6086 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -3127,6 +3127,20 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
#endif
+ /*
+ * special handling to preserve conf->params in the "http" section
+ * to inherit it to all servers
+ */
+
+ if (prev->params.hash.buckets == NULL
+ && conf->params_source == prev->params_source)
+ {
+ prev->params = conf->params;
+#if (NGX_HTTP_CACHE)
+ prev->params_cache = conf->params_cache;
+#endif
+ }
+
return NGX_CONF_OK;
}
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index f7f91d662..480e9749a 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -3357,6 +3357,20 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
#endif
+ /*
+ * special handling to preserve conf->headers in the "http" section
+ * to inherit it to all servers
+ */
+
+ if (prev->headers.hash.buckets == NULL
+ && conf->headers_source == prev->headers_source)
+ {
+ prev->headers = conf->headers;
+#if (NGX_HTTP_CACHE)
+ prev->headers_cache = conf->headers_cache;
+#endif
+ }
+
return NGX_CONF_OK;
}
diff --git a/src/http/modules/ngx_http_scgi_module.c b/src/http/modules/ngx_http_scgi_module.c
index 36656ec18..117143468 100644
--- a/src/http/modules/ngx_http_scgi_module.c
+++ b/src/http/modules/ngx_http_scgi_module.c
@@ -1558,6 +1558,20 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
#endif
+ /*
+ * special handling to preserve conf->params in the "http" section
+ * to inherit it to all servers
+ */
+
+ if (prev->params.hash.buckets == NULL
+ && conf->params_source == prev->params_source)
+ {
+ prev->params = conf->params;
+#if (NGX_HTTP_CACHE)
+ prev->params_cache = conf->params_cache;
+#endif
+ }
+
return NGX_CONF_OK;
}
diff --git a/src/http/modules/ngx_http_uwsgi_module.c b/src/http/modules/ngx_http_uwsgi_module.c
index 7f916e840..b6ae0d809 100644
--- a/src/http/modules/ngx_http_uwsgi_module.c
+++ b/src/http/modules/ngx_http_uwsgi_module.c
@@ -1820,6 +1820,20 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
#endif
+ /*
+ * special handling to preserve conf->params in the "http" section
+ * to inherit it to all servers
+ */
+
+ if (prev->params.hash.buckets == NULL
+ && conf->params_source == prev->params_source)
+ {
+ prev->params = conf->params;
+#if (NGX_HTTP_CACHE)
+ prev->params_cache = conf->params_cache;
+#endif
+ }
+
return NGX_CONF_OK;
}