summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_upstream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r--src/http/ngx_http_upstream.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index eb839e11b..75f3641c4 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -577,8 +577,17 @@ ngx_http_upstream_cache(ngx_http_request_t *r, ngx_http_upstream_t *u)
rc = ngx_http_file_cache_open(r);
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "http upstream cache: %i u:%ui", rc, c->uses);
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http upstream cache: %i", rc);
+
+ if (rc == NGX_HTTP_CACHE_UPDATING) {
+ if (u->conf->cache_use_stale & NGX_HTTP_UPSTREAM_FT_UPDATING) {
+ rc = NGX_OK;
+
+ } else {
+ rc = NGX_HTTP_CACHE_STALE;
+ }
+ }
if (rc == NGX_OK) {
@@ -4076,7 +4085,9 @@ ngx_http_upstream_hide_headers_hash(ngx_conf_t *cf,
{
conf->hide_headers_hash = prev->hide_headers_hash;
- if (conf->hide_headers_hash.buckets) {
+ if (conf->hide_headers_hash.buckets
+ && ((conf->cache == NULL) == (prev->cache == NULL)))
+ {
return NGX_OK;
}