BUG/MEDIUM: compression: Add a flag to know the filter is still processing data
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 9 Jun 2021 15:12:44 +0000 (17:12 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 10 Jun 2021 13:00:48 +0000 (15:00 +0200)
commit4288f7d48fef502ac63bb3105f2d658c8a21a1a5
tree2658bda115fc847553d08035a269aa3e5bbdbca6
parent7e8c60a4e343ffddaaeeaffbd4bf7939c8a3ec81
BUG/MEDIUM: compression: Add a flag to know the filter is still processing data

Since the commit acfd71b97 ("BUG/MINOR: http-comp: Preserve
HTTP_MSGF_COMPRESSIONG flag on the response"), there is no more flag to know
when the compression ends. This means it is possible to finish the
compression several time if there are trailers.

So, we reintroduce almost the same mechanism but with a dedicated flag. So
now, there is a bits field in the compression filter context.

The commit above is marked to be backported as far as 2.0. Thus this patch
must also be backported as far as 2.0.

(cherry picked from commit 12554d00f6ed16324a0dfbafb5230f8f0136e4ba)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 734863ecfa1f8a620904fd9332e01673728c784b)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/flt_http_comp.c