Mercurial > hg > nginx
comparison src/http/modules/ngx_http_scgi_module.c @ 5948:f2ff0aa89126
Upstream: mutually exclusive inheritance of "cache" and "store".
Currently, storing and caching mechanisms cannot work together, and a
configuration error is thrown when the proxy_store and proxy_cache
directives (as well as their friends) are configured on the same level.
But configurations like in the example below were allowed and could result
in critical errors in the error log:
proxy_store on;
location / {
proxy_cache one;
}
Only proxy_store worked in this case.
For more predictable and errorless behavior these directives now prevent
each other from being inherited from the previous level.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Mon, 22 Dec 2014 12:58:59 +0300 |
parents | d9025ea1f5a5 |
children | 634da79665d3 |
comparison
equal
deleted
inserted
replaced
5947:d9025ea1f5a5 | 5948:f2ff0aa89126 |
---|---|
1184 size_t size; | 1184 size_t size; |
1185 ngx_int_t rc; | 1185 ngx_int_t rc; |
1186 ngx_hash_init_t hash; | 1186 ngx_hash_init_t hash; |
1187 ngx_http_core_loc_conf_t *clcf; | 1187 ngx_http_core_loc_conf_t *clcf; |
1188 | 1188 |
1189 #if (NGX_HTTP_CACHE) | |
1190 | |
1191 if (conf->upstream.store > 0) { | |
1192 conf->upstream.cache = NULL; | |
1193 } | |
1194 | |
1195 if (conf->upstream.cache != NGX_CONF_UNSET_PTR | |
1196 && conf->upstream.cache != NULL) | |
1197 { | |
1198 conf->upstream.store = 0; | |
1199 } | |
1200 | |
1201 #endif | |
1202 | |
1189 if (conf->upstream.store == NGX_CONF_UNSET) { | 1203 if (conf->upstream.store == NGX_CONF_UNSET) { |
1190 ngx_conf_merge_value(conf->upstream.store, prev->upstream.store, 0); | 1204 ngx_conf_merge_value(conf->upstream.store, prev->upstream.store, 0); |
1191 | 1205 |
1192 conf->upstream.store_lengths = prev->upstream.store_lengths; | 1206 conf->upstream.store_lengths = prev->upstream.store_lengths; |
1193 conf->upstream.store_values = prev->upstream.store_values; | 1207 conf->upstream.store_values = prev->upstream.store_values; |