BUG/MINOR: htx: Preserve empty HTX messages with an unprocessed parsing error
This let a chance to HTX analyzers to handle the error and send the appropriate
response to the client.
This patch must be backported to 1.9.
diff --git a/include/common/htx.h b/include/common/htx.h
index 0eabf24..9f339b8 100644
--- a/include/common/htx.h
+++ b/include/common/htx.h
@@ -727,7 +727,7 @@
/* Upate <buf> accordingly to the HTX message <htx> */
static inline void htx_to_buf(struct htx *htx, struct buffer *buf)
{
- if (!htx->used) {
+ if (!htx->used && !(htx->flags & HTX_FL_PARSING_ERROR)) {
htx_reset(htx);
b_set_data(buf, 0);
}