BUG/MINOR: http-ana: Don't send payload for internal responses to HEAD requests
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 19 Oct 2020 16:01:38 +0000 (18:01 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 22 Oct 2020 15:13:22 +0000 (17:13 +0200)
commitd6c48366b81e4f95676b038db32d23cdc541735e
tree83597a3d07526ef00077241aa9a57cb53c2efd84
parent6414cd1fc0bc6ff77b745f8db1232b1f623b6475
BUG/MINOR: http-ana: Don't send payload for internal responses to HEAD requests

When an internal response is returned to a client, the message payload must be
skipped if it is a reply to a HEAD request. The payload is removed from the HTX
message just before the message forwarding.

This bugs has been around for a long time. It was already there in the pre-HTX
versions. In legacy HTTP mode, internal errors are not parsed. So this bug
cannot be easily fixed. Thus, this patch should only be backported in all HTX
versions, as far as 2.0. However, the code has significantly changed in the
2.2. Thus in the 2.1 and 2.0, the patch must be entirely reworked.
include/haproxy/htx.h
src/http_ana.c