Hi Mateusz,

You could try running:
./bin/traffic_server -T 'gzip|http_hdrs’

It should help you figure out if the Content-Encoding header is added as 
expected. You should see something similar to the following:

[Oct 22 13:25:27.342] Server {0x7fc8db178700} DIAG: (gzip) DEBUG: [gzip.cc 
<http://gzip.cc/>:292] [gzip_transform_one] gzip_transform: deflate with 
Z_NO_FLUSH
+++++++++ Header From Transform +++++++++
-- State Machine Id: 0
HTTP/1.0 200 OK
Server: BaseHTTP/0.3 Python/2.6.6
Date: Thu, 22 Oct 2015 20:25:27 GMT
Content-type: application/json
Content-Encoding: gzip
Vary: Accept-Encoding

+++++++++ Base Header for Building Response +++++++++
-- State Machine Id: 0
HTTP/1.0 200 OK
Server: BaseHTTP/0.3 Python/2.6.6
Date: Thu, 22 Oct 2015 20:25:27 GMT
Content-type: application/json
Content-Encoding: gzip
Vary: Accept-Encoding

You might find other useful debug tags here: 
http://trafficserver.readthedocs.org/en/5.3.x/sdk/troubleshooting-tips/unable-to-debug-tags.en.html
 
<http://trafficserver.readthedocs.org/en/5.3.x/sdk/troubleshooting-tips/unable-to-debug-tags.en.html>

I find using curl -v more practical for tests, I think it is easier to see 
request/response headers, etc.

HTH,

Cheers,
—Gancho


> On Oct 22, 2015, at 12:11 PM, Mateusz Zajakala <[email protected]> wrote:
> 
> Gancho,
> 
> thanks a lot for the tip on how to turn on debug mode. I did and NOW I'm 
> confused...
> 
> [Oct 22 21:06:51.790] Server {0x7f21f39027e0} DIAG: (gzip) INFO: normalized 
> accept encoding to gzip
> [Oct 22 21:06:51.791] Server {0x7f21f39027e0} DIAG: (gzip) INFO: compressible 
> content type [text/plain; charset=UTF-8], matched on pattern [text/*]
> [Oct 22 21:06:51.791] Server {0x7f21f39027e0} DIAG: (gzip) INFO: adding 
> compression transform
> [Oct 22 21:06:51.791] Server {0x7f21f39027e0} DIAG: (gzip) DEBUG: 
> [gzip.cc:292] [gzip_transform_one] gzip_transform: deflate with Z_NO_FLUSH
> [Oct 22 21:06:51.791] Server {0x7f21f39027e0} DIAG: (gzip) INFO: Compressed 
> size 25 (bytes), Original size 5, ratio: -4.000000
> 
> Apparently the GZIP plugin does something, however still no 
> "Content-encoding" header in the response. I check with Firebug AND Chrome, 
> there is: Vary: Accept-Encoding header (it disappears when I switch off gzip 
> plugin) but nothing more:
> HTTP/1.1 200 OK
> Date: Thu, 22 Oct 2015 19:08:51 GMT
> Server: ATS/5.3.0
> Last-Modified: Thu, 22 Oct 2015 14:06:49 GMT
> ETag: "c-5-522b20191dfdc-df"
> Accept-Ranges: bytes
> Content-Type: text/plain; charset=UTF-8
> Vary: Accept-Encoding
> Age: 0
> Connection: keep-alive
> Transfer-Encoding: chunked
> 
> 
> 
> What could be happening? I'm running on basically out-of-the-box records 
> config (I changed port no) and have some remap configs present...
> 
> THanks
> 
> 
> On Thu, Oct 22, 2015 at 7:41 PM, Gancho Tenev <[email protected] 
> <mailto:[email protected]>> wrote:
> ./bin/traffic_server -T gzip
> 
> 

Reply via email to