You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ok...@apache.org on 2019/08/23 14:36:29 UTC
[trafficserver] branch master updated: Update HttpTransact.cc
This is an automated email from the ASF dual-hosted git repository.
oknet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 5b700d2 Update HttpTransact.cc
5b700d2 is described below
commit 5b700d270b021c9facf664914fdefb3887800975
Author: YuanYingdong <19...@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
---
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 {