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 f86dcc3..4fc37ed 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -2083,6 +2083,9 @@
/* 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)