BUG/MINOR: http: deinitialize compression after a parsing error
When a parsing error was encountered in a chunked response, we failed
to properly deinitialize the compression context. There was no impact
till now since compression of chunked responses was disabled. No backport
is needed.
diff --git a/src/proto_http.c b/src/proto_http.c
index 8c54433..ff0a662 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -6414,6 +6414,11 @@
objt_server(s->target)->counters.failed_resp++;
return_bad_res_stats_ok:
+ if (unlikely(compressing)) {
+ http_compression_buffer_end(s, &res->buf, &tmpbuf, 0);
+ compressing = 0;
+ }
+
txn->rsp.msg_state = HTTP_MSG_ERROR;
/* don't send any error message as we're in the body */
stream_int_retnclose(res->cons, NULL);