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.
1 file changed