You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/12/14 18:12:16 UTC

[trafficserver] branch 7.1.x updated: Only allow the gzip/brotli transformation on 200 OK responses

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/7.1.x by this push:
     new e26157e  Only allow the gzip/brotli transformation on 200 OK responses
e26157e is described below

commit e26157e0b057aa766db8c2345305ca95c3c6a591
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Thu Dec 14 08:09:16 2017 -0700

    Only allow the gzip/brotli transformation on 200 OK responses
    
    This is per suggestion from Oknet and scw00, to avoid inompcatilibities
    between the transforms and the follow redirect APIs.
    
    This closes #2913.
    
    (cherry picked from commit d60ceaa0f38602c476509e96af13824419496f0d)
---
 plugins/gzip/gzip.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/plugins/gzip/gzip.cc b/plugins/gzip/gzip.cc
index 51718f8..1e34ab1 100644
--- a/plugins/gzip/gzip.cc
+++ b/plugins/gzip/gzip.cc
@@ -662,8 +662,9 @@ transformable(TSHttpTxn txnp, bool server, HostConfiguration *host_configuration
 
   resp_status = TSHttpHdrStatusGet(bufp, hdr_loc);
 
-  // conservatively pick some statusses to compress
-  if (!(resp_status == 200 || resp_status == 404 || resp_status == 500)) {
+  // For now, only do gzip / brotli on 200 responses, dealing with error responses can mess up plugins
+  // like the escalate.so plugin, and possibly the escalation feature of parent.config. See #2913.
+  if (resp_status != 200) {
     info("http response status [%d] is not compressible", resp_status);
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     return 0;

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].