]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http: disable compression when message has no body
authorWilly Tarreau <w@1wt.eu>
Tue, 27 Nov 2012 06:31:33 +0000 (07:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 27 Nov 2012 08:34:00 +0000 (09:34 +0100)
Compression was not disabled on 1xx, 204, 304 nor HEAD requests. This
is not really a problem, but it reports more compressed responses than
really done.

src/proto_http.c

index 6f1b9d796b0a68e16758015942e9d02617c33f8b..3184e24fd5f9d977848a5dcb0704fa0f00b31cbb 100644 (file)
@@ -5136,6 +5136,7 @@ int http_wait_for_response(struct session *s, struct channel *rep, int an_bit)
            (txn->status >= 100 && txn->status < 200) ||
            txn->status == 204 || txn->status == 304) {
                msg->flags |= HTTP_MSGF_XFER_LEN;
+               s->comp_algo = NULL;
                goto skip_content_length;
        }