In h1_parse_full_contig_chunks(), we first try to reserve the bigger HTX
DATA block as possible. It is ajusted at the end of chunks parsing or
removed if no data was copied. However, it should also be removed when a
parsing error is triggered. It could be an issue for http health checks and
haterm to properly handle errors.
This patch should be backported as far as 2.6.
parsing_error:
(*dsthtx)->flags |= HTX_FL_PARSING_ERROR;
+ htx_remove_blk(*dsthtx, htxret.blk);
h1m->err_state = h1m->state;
h1m->err_pos = ofs + end + ridx - start;
return 0;