]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: http-ana: Review error handling during HTTP payload forwarding
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 13 Jan 2023 10:02:28 +0000 (11:02 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 13 Jan 2023 10:18:23 +0000 (11:18 +0100)
commitf2b02cfd940eec2810590ef15b37631defd11b6b
tree8cb5b847b3053d20ba72edda7a4eff0ad7308ded
parent5aab0a30c5090f54b3e797cb1644b3215d9d6c3c
MAJOR: http-ana: Review error handling during HTTP payload forwarding

The error handling in the HTTP payload forwarding is far to be ideal because
both sides (request and response) are tested each time. It is espcially ugly
on the request side. To report a server error instead of a client error,
there are some workarounds to delay the error handling. The reason is that
the request analyzer is evaluated before the response one. In addition,
errors are tested before the data analysis. It means it is possible to
truncate data because errors may be handled to early.

So the error handling at this stages was totally reviewed. Aborts are now
handled after the data analysis. We also stop to finish the response on
request error or the opposite. As a side effect, the HTTP_MSG_ERROR state is
now useless. As another side effect, the termination flags are now set by
the HTTP analysers and not process_stream().
reg-tests/http-messaging/http_request_buffer.vtc
src/http_ana.c