From: William Lallemand Date: Mon, 12 Nov 2012 12:56:25 +0000 (+0100) Subject: BUG/MEDIUM: compression: no Content-Type header but type in configuration X-Git-Tag: v1.5-dev13~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c04ca5822290f35a42a8e890e68b8a71a0112472;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: compression: no Content-Type header but type in configuration HAProxy was compressing data when there was no Content-Type header in the response but a compression type specified in the configuration. --- diff --git a/src/proto_http.c b/src/proto_http.c index f86dcc3570..4fc37ed5da 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -2083,6 +2083,9 @@ int select_compression_response_header(struct session *s, struct buffer *res) /* this Content-Type should be compressed */ break; } + } else { + /* there is no Content-Type header */ + goto fail; } /* this Content-Type should not be compressed */ if (comp_type == NULL)