This is an automated email from the ASF dual-hosted git repository.
eze 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 0109c86079 Add nullptr check in
HttpTransact::is_stale_cache_response_returnable (#12108) (#12507)
0109c86079 is described below
commit 0109c860796433146de564778d33bf2c47133ca7
Author: Evan Zelkowitz <[email protected]>
AuthorDate: Mon Sep 15 09:12:01 2025 -0600
Add nullptr check in HttpTransact::is_stale_cache_response_returnable
(#12108) (#12507)
(cherry picked from commit 5b61f230d10f14d6f0d949b4c9118260bbc3875c)
Co-authored-by: Masaori Koshiba <[email protected]>
---
proxy/http/HttpTransact.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 088e14d537..0ec9b7eb11 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -6064,6 +6064,10 @@ HttpTransact::is_cache_response_returnable(State *s)
bool
HttpTransact::is_stale_cache_response_returnable(State *s)
{
+ if (s->cache_info.object_read == nullptr) {
+ return false;
+ }
+
HTTPHdr *cached_response = s->cache_info.object_read->response_get();
// First check if client allows cached response