diff --git a/src/proto_http.c b/src/proto_http.c index 18364052c..b2ae01cc1 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -4085,6 +4085,12 @@ void http_end_txn_clean_session(struct session *s) s->rep->flags &= ~(CF_SHUTR|CF_SHUTR_NOW|CF_READ_ATTACHED|CF_READ_ERROR|CF_READ_NOEXP|CF_STREAMER|CF_STREAMER_FAST|CF_WRITE_PARTIAL|CF_NEVER_WAIT); s->flags &= ~(SN_DIRECT|SN_ASSIGNED|SN_ADDR_SET|SN_BE_ASSIGNED|SN_FORCE_PRST|SN_IGNORE_PRST); s->flags &= ~(SN_CURR_SESS|SN_REDIRECTABLE); + + if (s->flags & SN_COMP_READY) + s->comp_algo->end(&s->comp_ctx); + s->comp_algo = NULL; + s->flags &= ~SN_COMP_READY; + s->txn.meth = 0; http_reset_txn(s); s->txn.flags |= TX_NOT_FIRST | TX_WAIT_NEXT_RQ; diff --git a/src/session.c b/src/session.c index f42f94293..9827eb82e 100644 --- a/src/session.c +++ b/src/session.c @@ -565,11 +565,10 @@ static void session_free(struct session *s) sess_change_server(s, NULL); } - if (s->flags & SN_COMP_READY) { + if (s->flags & SN_COMP_READY) s->comp_algo->end(&s->comp_ctx); - s->comp_algo = NULL; - s->flags &= ~SN_COMP_READY; - } + s->comp_algo = NULL; + s->flags &= ~SN_COMP_READY; if (s->req->pipe) put_pipe(s->req->pipe);