]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http: don't clear the SI_FL_DONT_WAKE flag between requests
authorWilly Tarreau <w@1wt.eu>
Tue, 31 Dec 2013 22:03:09 +0000 (23:03 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Dec 2013 22:03:09 +0000 (23:03 +0100)
It's a bit hasardous to wipe out all channel flags, this flag should
be left intact as it protects against recursive calls. Fortunately,
we have no possibility to meet this situation with current applets,
but better fix it before it becomes an issue.

This bug has been there for a long time, but it doesn't seem worth
backporting the fix.

src/proto_http.c

index 16db90a41233e0542ba1a150f81b296f5c066b95..7a9eaa09320646d6bd01a2256b92cecf76a5a94e 100644 (file)
@@ -4385,7 +4385,7 @@ void http_end_txn_clean_session(struct session *s)
        s->req->cons->err_type  = SI_ET_NONE;
        s->req->cons->conn_retries = 0;  /* used for logging too */
        s->req->cons->exp       = TICK_ETERNITY;
-       s->req->cons->flags     = SI_FL_NONE;
+       s->req->cons->flags    &= SI_FL_DONT_WAKE; /* we're in the context of process_session */
        s->req->flags &= ~(CF_SHUTW|CF_SHUTW_NOW|CF_AUTO_CONNECT|CF_WRITE_ERROR|CF_STREAMER|CF_STREAMER_FAST|CF_NEVER_WAIT);
        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);