]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: compression: no Content-Type header but type in configuration
authorWilliam Lallemand <wlallemand@exceliance.fr>
Mon, 12 Nov 2012 12:56:25 +0000 (13:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 15 Nov 2012 14:42:11 +0000 (15:42 +0100)
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

index f86dcc35709c710d2ad8c657a924674aedae6c95..4fc37ed5da56bac26bfaa025afd58568649e531d 100644 (file)
@@ -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)