From: Finn Arne Gangstad Date: Fri, 9 Nov 2012 20:02:36 +0000 (+0100) Subject: BUG: http: revert broken optimisation from 82fe75c1a79dac933391501b9d293bce34513755 X-Git-Tag: v1.5-dev13~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a410e81fba16f56d1b012955855567a43566f66;p=thirdparty%2Fhaproxy.git BUG: http: revert broken optimisation from 82fe75c1a79dac933391501b9d293bce34513755 This optimisation causes haproxy to time out requests that result in two TCP packets, one packet containing the header, and one packet containing the actual data. This is a very typical type of response from a lot of servers. [Willy: I suspect the fix might have an impact on the compression code which I'm not sure completely handles calls with 0 bytes to forward] --- diff --git a/src/proto_http.c b/src/proto_http.c index cd130494c9..218e265f1f 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -5533,10 +5533,6 @@ int http_response_forward_body(struct session *s, struct channel *res, int an_bi /* in most states, we should abort in case of early close */ channel_auto_close(res); - /* no data */ - if (res->buf->i == 0) - return 0; - /* this is the first time we need the compression buffer */ if (s->comp_algo != NULL && tmpbuf == NULL) { if ((tmpbuf = pool_alloc2(pool2_buffer)) == NULL)