Latest update - 7514

This commit is contained in:
2019-06-04 19:54:29 +09:00
parent 3f31c9270d
commit 3e1e852389
3 changed files with 10 additions and 13 deletions
+8 -11
View File
@@ -597,10 +597,6 @@ ngx_http_upstream_init_request(ngx_http_request_t *r)
u->cache_status = NGX_HTTP_CACHE_MISS;
u->request_sent = 1;
}
if (ngx_http_upstream_cache_background_update(r, u) != NGX_OK) {
rc = NGX_ERROR;
}
}
if (rc != NGX_DECLINED) {
@@ -902,9 +898,14 @@ ngx_http_upstream_cache(ngx_http_request_t *r, ngx_http_upstream_t *u)
|| c->stale_updating) && !r->background
&& u->conf->cache_background_update)
{
r->cache->background = 1;
u->cache_status = rc;
rc = NGX_OK;
if (ngx_http_upstream_cache_background_update(r, u) == NGX_OK) {
r->cache->background = 1;
u->cache_status = rc;
rc = NGX_OK;
} else {
rc = NGX_ERROR;
}
}
break;
@@ -1106,10 +1107,6 @@ ngx_http_upstream_cache_background_update(ngx_http_request_t *r,
{
ngx_http_request_t *sr;
if (!r->cached || !r->cache->background) {
return NGX_OK;
}
if (r == r->main) {
r->preserve_body = 1;
}