comparison src/http/modules/ngx_http_fastcgi_module.c @ 4401:d45742815c90

Fixed proxy_cache_use_stale in "no live upstreams" case.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 16 Jan 2012 11:01:52 +0000
parents 92deb73393f7
children d620f497c50f
comparison
equal deleted inserted replaced
4400:a0505851e70c 4401:d45742815c90
2312 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) { 2312 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) {
2313 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET 2313 conf->upstream.cache_use_stale = NGX_CONF_BITMASK_SET
2314 |NGX_HTTP_UPSTREAM_FT_OFF; 2314 |NGX_HTTP_UPSTREAM_FT_OFF;
2315 } 2315 }
2316 2316
2317 if (conf->upstream.cache_use_stale & NGX_HTTP_UPSTREAM_FT_ERROR) {
2318 conf->upstream.cache_use_stale |= NGX_HTTP_UPSTREAM_FT_NOLIVE;
2319 }
2320
2317 if (conf->upstream.cache_methods == 0) { 2321 if (conf->upstream.cache_methods == 0) {
2318 conf->upstream.cache_methods = prev->upstream.cache_methods; 2322 conf->upstream.cache_methods = prev->upstream.cache_methods;
2319 } 2323 }
2320 2324
2321 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD; 2325 conf->upstream.cache_methods |= NGX_HTTP_GET|NGX_HTTP_HEAD;