mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-29 14:50:59 +01:00
BUG: compression: properly disable compression when content-type does not match
Disabling compression based on the content-type was improperly done since the introduction of the COMP_READY flag, sometimes resulting in truncated responses.
This commit is contained in:
parent
16a2147dfe
commit
b97b6190e1
@ -2133,11 +2133,10 @@ int select_compression_response_header(struct session *s, struct buffer *res)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
if (s->flags & SN_COMP_READY) {
|
if (s->flags & SN_COMP_READY)
|
||||||
s->comp_algo->end(&s->comp_ctx);
|
s->comp_algo->end(&s->comp_ctx);
|
||||||
s->comp_algo = NULL;
|
s->comp_algo = NULL;
|
||||||
s->flags &= ~SN_COMP_READY;
|
s->flags &= ~SN_COMP_READY;
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user