aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_fastcgi_module.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2014-12-22 12:58:56 +0300
committerValentin Bartenev <vbart@nginx.com>2014-12-22 12:58:56 +0300
commit492844dbb18035617b6c220c4a857d9333c6ea61 (patch)
tree01af9a9921320490599f92489d4535fe752a101b /src/http/modules/ngx_http_fastcgi_module.c
parentcf9283113151fa4572bfdb639a0934b5a3a052bb (diff)
downloadnginx-492844dbb18035617b6c220c4a857d9333c6ea61.tar.gz
nginx-492844dbb18035617b6c220c4a857d9333c6ea61.zip
Upstream: simplified proxy_store and friends configuration code.
This changes internal API related to handling of the "store" flag in ngx_http_upstream_conf_t. Previously, a non-null value of "store_lengths" was enough to enable store functionality with custom path. Now, the "store" flag is also required to be set. No functional changes.
Diffstat (limited to 'src/http/modules/ngx_http_fastcgi_module.c')
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index 1c63786c8..b7d07daad 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -2436,10 +2436,8 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_merge_value(conf->upstream.store,
prev->upstream.store, 0);
- if (conf->upstream.store_lengths == NULL) {
- conf->upstream.store_lengths = prev->upstream.store_lengths;
- conf->upstream.store_values = prev->upstream.store_values;
- }
+ conf->upstream.store_lengths = prev->upstream.store_lengths;
+ conf->upstream.store_values = prev->upstream.store_values;
}
ngx_conf_merge_uint_value(conf->upstream.store_access,
@@ -3206,9 +3204,7 @@ ngx_http_fastcgi_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
ngx_str_t *value;
ngx_http_script_compile_t sc;
- if (flcf->upstream.store != NGX_CONF_UNSET
- || flcf->upstream.store_lengths)
- {
+ if (flcf->upstream.store != NGX_CONF_UNSET) {
return "is duplicate";
}
@@ -3229,8 +3225,9 @@ ngx_http_fastcgi_store(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
#endif
+ flcf->upstream.store = 1;
+
if (ngx_strcmp(value[1].data, "on") == 0) {
- flcf->upstream.store = 1;
return NGX_CONF_OK;
}
@@ -3275,7 +3272,7 @@ ngx_http_fastcgi_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
return NGX_CONF_OK;
}
- if (flcf->upstream.store > 0 || flcf->upstream.store_lengths) {
+ if (flcf->upstream.store > 0) {
return "is incompatible with \"fastcgi_store\"";
}