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.
This commit is contained in:
Christopher Faulet 2019-04-01 11:33:17 +02:00
parent 33d29e2a11
commit f192d683a7
1 changed files with 1 additions and 1 deletions

View File

@ -727,7 +727,7 @@ static inline struct htx *htx_from_buf(struct buffer *buf)
/* 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);
}