Updated Branches:
  refs/heads/master 27e8fb914 -> 6af64a9d2

TS-2419: Don't close client connection when responding with a 204 and
there is no body - Fixed a bug when the 204 is served by cache


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

Branch: refs/heads/master
Commit: a5c00b225cb8e408cf7f1b117185e1a2bb3d11dc
Parents: e876654
Author: Bryan Call <bc...@apache.org>
Authored: Thu Jan 23 14:15:08 2014 +0100
Committer: Bryan Call <bc...@apache.org>
Committed: Thu Jan 23 14:15:08 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a5c00b22/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index f09e50a..3f83952 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -6753,7 +6753,8 @@ HttpTransact::handle_response_keep_alive_headers(State* 
s, HTTPVersion ver, HTTP
     ka_action = KA_DISABLED;
   }
   else if (heads->status_get() == HTTP_STATUS_NO_CONTENT &&
-      (s->current.server->transfer_encoding != NO_TRANSFER_ENCODING || 
heads->get_content_length() != 0)) {
+      (s->source == SOURCE_HTTP_ORIGIN_SERVER && 
s->current.server->transfer_encoding != NO_TRANSFER_ENCODING
+       || heads->get_content_length() != 0)) {
     // some systems hang until the connection closes when receiving a 204 
regardless of the K-A headers
     // close if there is any body response from the origin
     ka_action = KA_CLOSE;

Reply via email to