mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 06:03:31 -06:00
Upstream: fixed inheritance of proxy_store and friends.
The proxy_store, fastcgi_store, scgi_store and uwsgi_store were inherited incorrectly if a directive with variables was defined, and then redefined to the "on" value, i.e. in configurations like: proxy_store /data/www$upstream_http_x_store; location / { proxy_store on; }
This commit is contained in:
parent
827b2511e6
commit
fb7d63250e
@ -2432,7 +2432,7 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
|
||||
ngx_hash_init_t hash;
|
||||
ngx_http_core_loc_conf_t *clcf;
|
||||
|
||||
if (conf->upstream.store != 0) {
|
||||
if (conf->upstream.store == NGX_CONF_UNSET) {
|
||||
ngx_conf_merge_value(conf->upstream.store,
|
||||
prev->upstream.store, 0);
|
||||
|
||||
|
@ -2624,7 +2624,7 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
|
||||
ngx_http_proxy_rewrite_t *pr;
|
||||
ngx_http_script_compile_t sc;
|
||||
|
||||
if (conf->upstream.store != 0) {
|
||||
if (conf->upstream.store == NGX_CONF_UNSET) {
|
||||
ngx_conf_merge_value(conf->upstream.store,
|
||||
prev->upstream.store, 0);
|
||||
|
||||
|
@ -1186,7 +1186,7 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
|
||||
ngx_hash_init_t hash;
|
||||
ngx_http_core_loc_conf_t *clcf;
|
||||
|
||||
if (conf->upstream.store != 0) {
|
||||
if (conf->upstream.store == NGX_CONF_UNSET) {
|
||||
ngx_conf_merge_value(conf->upstream.store, prev->upstream.store, 0);
|
||||
|
||||
if (conf->upstream.store_lengths == NULL) {
|
||||
|
@ -1400,7 +1400,7 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
|
||||
ngx_hash_init_t hash;
|
||||
ngx_http_core_loc_conf_t *clcf;
|
||||
|
||||
if (conf->upstream.store != 0) {
|
||||
if (conf->upstream.store == NGX_CONF_UNSET) {
|
||||
ngx_conf_merge_value(conf->upstream.store, prev->upstream.store, 0);
|
||||
|
||||
if (conf->upstream.store_lengths == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user