changeset 7125:b8fc701daf8e

Upstream: even better handling of invalid headers in cache files. When parsing of headers in a cache file fails, already parsed headers need to be cleared, and protocol state needs to be reinitialized. To do so, u->request_sent is now set to ensure ngx_http_upstream_reinit() will be called. This change complements improvements in 46ddff109e72.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 09 Oct 2017 15:59:10 +0300
parents 3b4fa572d56d
children 77fe752b4586
files src/http/ngx_http_upstream.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -584,6 +584,7 @@ ngx_http_upstream_init_request(ngx_http_
                 r->cached = 0;
                 u->buffer.start = NULL;
                 u->cache_status = NGX_HTTP_CACHE_MISS;
+                u->request_sent = 1;
             }
 
             if (ngx_http_upstream_cache_background_update(r, u) != NGX_OK) {