diff --git a/src/proto_http.c b/src/proto_http.c index 357401fe7..a72f3021f 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -4462,6 +4462,11 @@ int http_process_req_common(struct stream *s, struct channel *req, int an_bit, s return 1; tarpit: + /* Allow cookie logging + */ + if (s->be->cookie_name || sess->fe->capture_name) + manage_client_side_cookies(s, req); + /* When a connection is tarpitted, we use the tarpit timeout, * which may be the same as the connect timeout if unspecified. * If unset, then set it to zero because we really want it to @@ -4474,11 +4479,6 @@ int http_process_req_common(struct stream *s, struct channel *req, int an_bit, s */ channel_dont_connect(req); - /* Allow cookie logging - */ - if (s->be->cookie_name || sess->fe->capture_name) - manage_client_side_cookies(s, req); - txn->status = http_err_codes[deny_status]; req->analysers &= AN_REQ_FLT_END; /* remove switching rules etc... */