diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2017-10-09 15:59:10 +0300 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2017-10-09 15:59:10 +0300 |
| commit | 0737e6d841d87e734dfb980a59094c26621bb80d (patch) | |
| tree | 334256d48162362ba558e90d0ad9440b04baf775 | |
| parent | 53d655f89407af017cd193fd4d8d82118c9c2c80 (diff) | |
| download | nginx-0737e6d841d87e734dfb980a59094c26621bb80d.tar.gz nginx-0737e6d841d87e734dfb980a59094c26621bb80d.tar.bz2 | |
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.
| -rw-r--r-- | src/http/ngx_http_upstream.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 985d633e0..1f6a8fe0c 100644 --- 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_request_t *r) 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) { |
