Repository: trafficserver
Updated Branches:
  refs/heads/master 1bf8746e0 -> 2f154297a


TS-3828: HEAD requests hang when origin returns Transfer-Encoding: Chunked


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/aa9b94fa
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/aa9b94fa
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/aa9b94fa

Branch: refs/heads/master
Commit: aa9b94fab4020798b81a749f6e5994387f7a09c9
Parents: 5597664
Author: Zizhong Zhang <zizh...@linkedin.com>
Authored: Thu Aug 6 01:49:50 2015 -0700
Committer: Zizhong Zhang <zizh...@linkedin.com>
Committed: Thu Aug 6 01:49:50 2015 -0700

----------------------------------------------------------------------
 proxy/http/HttpTransact.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/aa9b94fa/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 3fb42fa..a4d492e 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -7928,8 +7928,12 @@ HttpTransact::build_response(State *s, HTTPHdr 
*base_response, HTTPHdr *outgoing
 
   // If the response is prohibited from containing a body,
   //  we know the content length is trustable for keep-alive
-  if (is_response_body_precluded(status_code, s->method))
+  if (is_response_body_precluded(status_code, s->method)) {
     s->hdr_info.trust_response_cl = true;
+    s->hdr_info.response_content_length = 0;
+    s->client_info.transfer_encoding = HttpTransact::NO_TRANSFER_ENCODING;
+    s->server_info.transfer_encoding = HttpTransact::NO_TRANSFER_ENCODING;
+  }
 
   handle_response_keep_alive_headers(s, outgoing_version, outgoing_response);
 

Reply via email to