From 9a8c5de3751f800a7e5eedab01872ff2e063fbb4 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sat, 16 Aug 2008 16:11:07 +0200 Subject: [PATCH] [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). --- src/proto_http.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/proto_http.c b/src/proto_http.c index 6121a93c1..552f7e5bf 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.