]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: http-check: Skip C-L header for empty body when it's not mandatory
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Feb 2023 17:51:26 +0000 (18:51 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Feb 2023 17:51:27 +0000 (18:51 +0100)
commitd48bfb6983a3d28183b068a4f8975c1c5cd05978
tree290e723a4f7bd04f3189ece57aa4e50d64407215
parent0506d9de512291ed2526654800b98a2317a67b6d
BUG/MINOR: http-check: Skip C-L header for empty body when it's not mandatory

The Content-Length header is always added into the request for an HTTP
health-check. However, when there is no payload, this header may be skipped
for OPTIONS, GET, HEAD and DELETE methods. In fact, it is a "SHOULD NOT" in
the RCF 9110 (#8.6).

It is not really an issue in itself but it seems to be an issue for AWS
ELB. It returns a 400-Bad-Request if a HEAD/GET request with no payload
contains a Content-Length header.

So, it is better to skip this header when possible.

This patch should fix the issue #2026. It could be backported as far as 2.2.
src/tcpcheck.c