Hi Tim,

On Thu, Jun 30, 2016 at 03:58:37PM +0000, Richert, Tim wrote:
> Hello there,
> 
> I've been working with haproxy for some time now and it's doing a fantastic 
> job! Thank you for all your development and all your efforts in this great 
> piece of software!
> 
> I am trying to implement compression and it's working just fine with fixed 
> Content-Lengths.
> But it seems that compression isn't working when Transfer-Encoding is 
> 'chunked'.
> 
> Documentation indicates this as well:
> Compression is disabled when:
> [..]
>   * response header "Transfer-Encoding" contains "chunked" (Temporary
>     Workaround)
> [..]
> 
> But the next condition is:
>   * response contain neither a "Content-Length" header nor a
>     "Transfer-Encoding" whose last value is "chunked"
> 
> If I understand that second part correctly, than compression should kick in.
> 
> I couldn't find more details on the first part and why there is a workaround 
> and if it's still in place.
> Changelog tells me:
> 2014/04/23 : 1.5-dev23
>     - MAJOR: http: re-enable compression on chunked encoding
> 
> I am currently using
> HA-Proxy version 1.6.4 2016/03/13
> Copyright 2000-2016 Willy Tarreau <wi...@haproxy.org>
(...)

Normally it should work. I'm using it myself to compress the stats page
on demo.haproxy.org. You should check the server's response headers, there
might be something causing it to be disabled. It's also possible that the
client's user-agent matches a blacklisted pattern. You may want to take a
look at select_compression_request_header() in proto_http.c.

Regards,
Willy

Reply via email to