trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From osch...@apache.org
Subject git commit: TS-1261 enable chunking when transforming from cache
Date Sat, 01 Sep 2012 22:23:29 GMT
Updated Branches:
  refs/heads/master 86550f298 -> 98c3c0b49


TS-1261 enable chunking when transforming from cache

Tested: Ubuntu 12.04
Author: Otto van der Schaaf <oschaaf@apache.org>

when transforming a document from cache, we will currently either
close the connection, or send a content length header
(when the full transformed response is buffered). sending chunked
responses could help lowering latencies and possibly memory
requirements in some use cases.


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

Branch: refs/heads/master
Commit: 98c3c0b496cf9087f91a4d53e9163e5c82494247
Parents: 86550f2
Author: Otto van der Schaaf <oschaaf@apache.org>
Authored: Sun Sep 2 00:19:33 2012 +0200
Committer: Otto van der Schaaf <oschaaf@apache.org>
Committed: Sun Sep 2 00:19:33 2012 +0200

----------------------------------------------------------------------
 proxy/http/HttpTransact.cc |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/98c3c0b4/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index c4c943a..2313b73 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -6983,7 +6983,9 @@ HttpTransact::handle_response_keep_alive_headers(State* s, HTTPVersion
ver, HTTP
           // length (e.g. no Content-Length and Connection:close in HTTP/1.1 responses)
           s->hdr_info.trust_response_cl == false)) ||
          // handle serve from cache (read-while-write) case
-         (s->source == SOURCE_CACHE && s->hdr_info.trust_response_cl == false)))
{
+         (s->source == SOURCE_CACHE && s->hdr_info.trust_response_cl == false)
||
+	  //any transform will potentially alter the content length. try chunking if possible
+	  (s->source == SOURCE_TRANSFORM && s->hdr_info.trust_response_cl == false
))) {
       s->client_info.receive_chunked_response = true;
       heads->value_append(MIME_FIELD_TRANSFER_ENCODING, MIME_LEN_TRANSFER_ENCODING, HTTP_VALUE_CHUNKED,
HTTP_LEN_CHUNKED, true);
     } else {


Mime
View raw message