From f192d683a73a4ab1afe67650bd05b6a4a64f7278 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 1 Apr 2019 11:33:17 +0200 Subject: [PATCH] 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. --- include/common/htx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/common/htx.h b/include/common/htx.h index 0eabf2400..9f339b877 100644 --- a/include/common/htx.h +++ b/include/common/htx.h @@ -727,7 +727,7 @@ static inline struct htx *htx_from_buf(struct buffer *buf) /* Upate accordingly to the HTX message */ 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); }