]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: session: Send a default HTTP error if accept fails for a H1 socket
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 17 Jul 2019 19:36:33 +0000 (21:36 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Jul 2019 07:46:23 +0000 (09:46 +0200)
commit39566d1892e30711e13ead44824543755f4a5522
tree455110e95f044747e34d18308027948ac61690ac
parent76f4c370f149149c07bf1f88ae10c33c36c458a0
BUG/MINOR: session: Send a default HTTP error if accept fails for a H1 socket

If session_accept_fd() fails for a raw HTTP socket, we try to send an HTTP error
500. But we must not rely on error messages of the proxy or on the array
http_err_chunks because these are HTX messages. And it should be too expensive
to convert an HTX message to a raw message at this place. So instead, we send a
default HTTP error message from the array http_err_msgs.

This patch must be backported to 2.0 and 1.9.
src/session.c