From c04ca5822290f35a42a8e890e68b8a71a0112472 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Mon, 12 Nov 2012 13:56:25 +0100 Subject: [PATCH] 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. --- src/proto_http.c | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.47.3