diff --git a/lib/nginx-http-flv-module b/lib/nginx-http-flv-module index 6f733fa..facb13c 160000 --- a/lib/nginx-http-flv-module +++ b/lib/nginx-http-flv-module @@ -1 +1 @@ -Subproject commit 6f733fa7736579be0ab3ec7758507841978b3b64 +Subproject commit facb13cd01b2b649cbeba0f4099c66df926227b2 diff --git a/lib/openssl b/lib/openssl index 64d458d..9a23f88 160000 --- a/lib/openssl +++ b/lib/openssl @@ -1 +1 @@ -Subproject commit 64d458de91a0e0b078e70b83d3b36f4e25245a39 +Subproject commit 9a23f88dc215ae0293a2d23124d3cff4fb5b05db diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 9258243..ffb09a9 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -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; }