Welcome! Log In Create A New Profile

Advanced

[nginx] Upstream: even better handling of invalid headers in cache files.

Maxim Dounin
October 09, 2017 09:58AM
details: http://hg.nginx.org/nginx/rev/b8fc701daf8e
branches:
changeset: 7125:b8fc701daf8e
user: Maxim Dounin <mdounin@mdounin.ru>
date: Mon Oct 09 15:59:10 2017 +0300
description:
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.

diffstat:

src/http/ngx_http_upstream.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
--- 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) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Upstream: even better handling of invalid headers in cache files.

Maxim Dounin 396 October 09, 2017 09:58AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 243
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready