]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: h1-htx: Properly handle bodyless messages
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 8 Jan 2025 16:42:44 +0000 (17:42 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 8 Jan 2025 17:20:26 +0000 (18:20 +0100)
commitb9cc361b35e66c1f2d26a9b703f8759f70cbc03c
tree3da9bd092ad7cfcf90311a717a41ad91c63bbdfb
parentca773e1a2a4ed4992aba2ac26bf35011a7b8c11d
BUG/MEDIUM: h1-htx: Properly handle bodyless messages

During h1 parsing, there are some postparsing checks to detect bodyless
messages and switch the parsing in DONE state. However, a case was not
properly handled. Responses to HEAD requests with a "transfer-encoding"
header. The response parser remained blocked waiting for the response body.

To fix the issue, the postparsing was sliglty modified. Instead of trying to
handle bodyless messages in a common way between the request and the
response, it is now performed in the dedicated postparsing functions. It is
easier to enumerate all cases, especially because there is already a test
for responses to HEAD requests.

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