This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.2.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.2.x by this push: new 283ac27b1 Handle hit as miss when cach obj is invalid (#8871) 283ac27b1 is described below commit 283ac27b1878f628a748a0de672300b9b88f1e28 Author: Serris Lew <serrisn...@gmail.com> AuthorDate: Tue May 31 09:55:28 2022 -0700 Handle hit as miss when cach obj is invalid (#8871) Co-authored-by: Serris Lew <lser...@apple.com> (cherry picked from commit 138c1aabcb2d10b1632385d9ca4cea0c3deaf7d5) --- proxy/http/HttpTransact.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index 4fd26abd8..c45253d8c 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -2814,6 +2814,11 @@ HttpTransact::HandleCacheOpenReadHit(State *s) obj = s->cache_info.object_read; } + if (obj == nullptr || !obj->valid()) { + HandleCacheOpenReadMiss(s); + return; + } + // do we have to authenticate with the server before // sending back the cached response to the client? Authentication_t authentication_needed = AuthenticationNeeded(s->txn_conf, &s->hdr_info.client_request, obj->response_get());