From: Dmitry Sivachenko Date: Wed, 28 Nov 2012 13:47:11 +0000 (+0400) Subject: DOC: add a few precisions on compression X-Git-Tag: v1.5-dev15~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9f3b45d7a351e73652535d77d4a4de1891afbfc;p=thirdparty%2Fhaproxy.git DOC: add a few precisions on compression Please consider the attached patch, I hope it will clarify haproxy's behavior a bit. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 1f9d92c9b1..111b8854e9 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -1903,16 +1903,23 @@ compression offload Compression will be activated depending on the Accept-Encoding request header. With identity, it does not take care of that header. + If backend servers support HTTP compression, these directives + will be no-op: haproxy will see the compressed response and will not + compress again. If backend servers do not support HTTP compression and + there is Accept-Encoding header in request, haproxy will compress the + matching response. The "offload" setting makes haproxy remove the Accept-Encoding header to prevent backend servers from compressing responses. It is strongly recommended not to do this because this means that all the compression work will be done on the single point where haproxy is located. However in some deployment scenarios, haproxy may be installed in front of a buggy gateway - and need to prevent it from emitting invalid payloads. In this case, simply - removing the header in the configuration does not work because it applies - before the header is parsed, so that prevents haproxy from compressing. The - "offload" setting should then be used for such scenarios. + with broken HTTP compression implementation which can't be turned off. + In that case haproxy can be used to prevent that gateway from emitting + invalid payloads. In this case, simply removing the header in the + configuration does not work because it applies before the header is parsed, + so that prevents haproxy from compressing. The "offload" setting should + then be used for such scenarios. Compression is disabled when: * the server is not HTTP/1.1.