From: Cyril Bonté Date: Wed, 22 Oct 2014 20:30:13 +0000 (+0200) Subject: BUG/MINOR: log: fix request flags when keep-alive is enabled X-Git-Tag: v1.6-dev1~290 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a83a50bd7d9389d3f799b9e3b7c7be346be3fab7;p=thirdparty%2Fhaproxy.git BUG/MINOR: log: fix request flags when keep-alive is enabled Colin Ingarfield reported some unexplainable flags in the logs. For example, a "LR" termination state was set on a request which was forwarded to a server, where "LR" means that the request should have been handled internally by haproxy. This case happens when at least client side keep-alive is enabled. Next requests in the connection will inherit the flags from the previous request. 2 fields are impacted : "termination_state" and "Tt" in the timing events, where a "+" can be added, when a previous request was redispatched. This is not critical for the service itself but can confuse troubleshooting. The fix must be backported to 1.5 and 1.4. --- diff --git a/src/proto_http.c b/src/proto_http.c index 6497dac501..c793d99f40 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -4926,6 +4926,7 @@ 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|CF_WROTE_DATA); 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|SN_SRV_REUSED); + s->flags &= ~(SN_ERR_MASK|SN_FINST_MASK|SN_REDISP); s->txn.meth = 0; http_reset_txn(s);