From: Willy Tarreau Date: Sat, 16 Aug 2008 14:11:07 +0000 (+0200) Subject: [BUG] process_response must not enable the read FD X-Git-Tag: v1.3.16-rc1~198 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a8c5de3751f800a7e5eedab01872ff2e063fbb4;p=thirdparty%2Fhaproxy.git [BUG] process_response must not enable the read FD Since the separation of TCP and HTTP state machines, the HTTP code must not play anymore with the file descriptor status without checking if they are closed. Remains of such practice have caused busy loops under some circumstances (mainly when client closed during headers response). --- diff --git a/src/proto_http.c b/src/proto_http.c index 6121a93c16..552f7e5bf6 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -2570,17 +2570,6 @@ int process_response(struct session *t) } } - - if ((rep->l < rep->rlim - rep->data) && !tick_isset(rep->rex)) { - EV_FD_COND_S(t->srv_fd, DIR_RD); - /* fd in DIR_RD was disabled, perhaps because of a previous buffer - * full. We cannot loop here since stream_sock_read will disable it only if - * rep->l == rlim-data - */ - rep->rex = tick_add_ifset(now_ms, t->be->timeout.server); - } - - /* * Now we quickly check if we have found a full valid response. * If not so, we check the FD and buffer states before leaving.