This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new dbe00ba  Update HttpTransact.cc
dbe00ba is described below

commit dbe00ba98224c3acd5dd5064b9506f255cbff9ad
Author: YuanYingdong <1975643...@qq.com>
AuthorDate: Fri Aug 23 20:17:33 2019 +0800

    Update HttpTransact.cc
    
    Once we get hit stale and cannot connec t to source site but we decice to 
serve from cache ,we need to set s->source = SOURCE_CACHE or we will get 
coredump in HttpTransact::handle_content_length_header
    
    (cherry picked from commit 5b700d270b021c9facf664914fdefb3887800975)
---
 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 3dbc176..2023688 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -3704,7 +3704,7 @@ HttpTransact::handle_server_connection_not_open(State *s)
     ink_assert(s->cache_info.object_read != nullptr);
     ink_assert(s->cache_info.action == CACHE_DO_UPDATE || s->cache_info.action 
== CACHE_DO_SERVE);
     ink_assert(s->internal_msg_buffer == nullptr);
-
+    s->source = SOURCE_CACHE;
     TxnDebug("http_trans", "[hscno] serving stale doc to client");
     build_response_from_cache(s, HTTP_WARNING_CODE_REVALIDATION_FAILED);
   } else {

Reply via email to