BUG/MEDIUM: http-ana: Don't loop trying to generate a malformed 500 response
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Jun 2020 14:04:50 +0000 (16:04 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 25 Jun 2020 19:50:20 +0000 (21:50 +0200)
commit40e6b550ce35ff164f71799d8378c4e2350d3640
tree02d371fcf8cef93b08f5d63bda396991bb6b9d36
parentbfa3e81a7baf58ff8f92cd34818a7e0be47ea540
BUG/MEDIUM: http-ana: Don't loop trying to generate a malformed 500 response

When HAProxy generates a 500 response, if the formatting failed, for instance
because the message is larger than a buffer, it retries to format it in loop. To
fix the bug, we must stop trying to send a response if it is a non-rewritable
response (TX_CONST_REPLY flag is set on the HTTP transaction).

Because this part is not trivial, some comments have been added.

No backport is needed.
src/http_ana.c