Welcome! Log In Create A New Profile

Advanced

[nginx] Upstream: fixed inheritance of proxy_store and friends.

Valentin Bartenev
December 11, 2014 08:36AM
details: http://hg.nginx.org/nginx/rev/e3b3b89d74e8
branches:
changeset: 5940:e3b3b89d74e8
user: Valentin Bartenev <vbart@nginx.com>
date: Thu Oct 09 20:30:11 2014 +0400
description:
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;
}

diffstat:

src/http/modules/ngx_http_fastcgi_module.c | 2 +-
src/http/modules/ngx_http_proxy_module.c | 2 +-
src/http/modules/ngx_http_scgi_module.c | 2 +-
src/http/modules/ngx_http_uwsgi_module.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

diffs (48 lines):

diff -r aeea0522332f -r e3b3b89d74e8 src/http/modules/ngx_http_fastcgi_module.c
--- a/src/http/modules/ngx_http_fastcgi_module.c Tue Dec 09 18:22:39 2014 +0300
+++ b/src/http/modules/ngx_http_fastcgi_module.c Thu Oct 09 20:30:11 2014 +0400
@@ -2432,7 +2432,7 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf
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);

diff -r aeea0522332f -r e3b3b89d74e8 src/http/modules/ngx_http_proxy_module.c
--- a/src/http/modules/ngx_http_proxy_module.c Tue Dec 09 18:22:39 2014 +0300
+++ b/src/http/modules/ngx_http_proxy_module.c Thu Oct 09 20:30:11 2014 +0400
@@ -2624,7 +2624,7 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t
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);

diff -r aeea0522332f -r e3b3b89d74e8 src/http/modules/ngx_http_scgi_module.c
--- a/src/http/modules/ngx_http_scgi_module.c Tue Dec 09 18:22:39 2014 +0300
+++ b/src/http/modules/ngx_http_scgi_module.c Thu Oct 09 20:30:11 2014 +0400
@@ -1186,7 +1186,7 @@ ngx_http_scgi_merge_loc_conf(ngx_conf_t
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) {
diff -r aeea0522332f -r e3b3b89d74e8 src/http/modules/ngx_http_uwsgi_module.c
--- a/src/http/modules/ngx_http_uwsgi_module.c Tue Dec 09 18:22:39 2014 +0300
+++ b/src/http/modules/ngx_http_uwsgi_module.c Thu Oct 09 20:30:11 2014 +0400
@@ -1400,7 +1400,7 @@ ngx_http_uwsgi_merge_loc_conf(ngx_conf_t
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) {

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Upstream: fixed inheritance of proxy_store and friends.

Valentin Bartenev 635 December 11, 2014 08:36AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 260
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready