]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: http-check: Don't pretend a C-L heeader is set before adding it
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 3 Feb 2025 17:36:17 +0000 (18:36 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 3 Feb 2025 17:46:41 +0000 (18:46 +0100)
commitfad68cb16d7f99acd2b327ff2f8a4d9ab88a68d8
tree420a5daba789ed3202396142a00bab04598741e7
parent0846638f7fe4f271287ab2b982925e5114e6cfde
BUG/MINOR: http-check: Don't pretend a C-L heeader is set before adding it

When a GET/HEAD/OPTIONS/DELETE healthcheck request was formatted, we claimed
there was a "content-length" header set even when there was no payload,
leading to actually send a "content-length: 0" header to the server. It was
unexpected and could be rejected by servers.

When a healthcheck request is sent we must take care to state there is a
"content-length" header when it is explicitly added.

This patch should fix the issue #2851. It must be backported as far as 2.9.
src/tcpcheck.c