From 72a8cb8d26d1a7b752b5da7984e9cddbdd2758ef Mon Sep 17 00:00:00 2001 From: Zhengxi Li Date: Tue, 1 Aug 2023 17:25:42 -0400 Subject: [PATCH] 8.1.x: Fix a crash triggered by invalid range header (#10134) Co-authored-by: Katsutoshi Ikenoya Gbp-Pq: Name 0002-8.1.x-Fix-a-crash-triggered-by-invalid-range-header-.patch --- proxy/http/HttpTransact.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index c5a37a3b..c1d0cba0 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -2820,7 +2820,7 @@ HttpTransact::build_response_from_cache(State *s, HTTPWarningCode warning_code) // this late. TxnDebug("http_seq", "[HttpTransact::HandleCacheOpenReadHit] Out-of-order Range request - tunneling"); s->cache_info.action = CACHE_DO_NO_ACTION; - if (s->force_dns) { + if (s->force_dns || s->dns_info.lookup_success) { HandleCacheOpenReadMiss(s); // DNS is already completed no need of doing DNS } else { CallOSDNSLookup(s); -- 2.30.2