Repository: trafficserver
Updated Branches:
  refs/heads/master 9f0013d20 -> 4eb2563cc


TS-3954: Latency with SPDY/HTTP/2 when chunking disabled (not default setting)


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

Branch: refs/heads/master
Commit: 4eb2563cc8021d5a4d2034ce905c494044b01f65
Parents: 9f0013d
Author: Bryan Call <[email protected]>
Authored: Thu Oct 1 10:42:00 2015 -0700
Committer: Bryan Call <[email protected]>
Committed: Thu Oct 1 10:42:00 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4eb2563c/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 0737466..36b3767 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -6948,7 +6948,10 @@ HttpTransact::handle_response_keep_alive_headers(State 
*s, HTTPVersion ver, HTTP
     // Insert a Transfer-Encoding header in the response if necessary.
 
     // check that the client is HTTP 1.1 and the conf allows chunking
-    if (s->client_info.http_version == HTTPVersion(1, 1) && 
s->txn_conf->chunking_enabled == 1 &&
+    if (s->client_info.http_version == HTTPVersion(1, 1) &&
+        (s->txn_conf->chunking_enabled == 1 ||
+         (s->state_machine->plugin_tag &&
+          (!strcmp(s->state_machine->plugin_tag, "http/2") || 
!strncmp(s->state_machine->plugin_tag, "spdy", 4)))) &&
         // if we're not sending a body, don't set a chunked header regardless 
of server response
         !is_response_body_precluded(s->hdr_info.client_response.status_get(), 
s->method) &&
         // we do not need chunked encoding for internal error messages

Reply via email to