]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG: http: re-enable TCP quick-ack upon incomplete HTTP requests
authorWilly Tarreau <w@1wt.eu>
Sat, 17 Dec 2011 15:34:27 +0000 (16:34 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 17 Dec 2011 15:45:29 +0000 (16:45 +0100)
commit5e205524ad24003ecc4dbb435066aebe7ed58d95
tree495fcf58df14a1e20854d1c84f61f70d2d29c6aa
parentb6672b547ad6cc1c8329bece62e9d99df28d1b46
BUG: http: re-enable TCP quick-ack upon incomplete HTTP requests

By default we disable TCP quick-acking on HTTP requests so that we
avoid sending a pure ACK immediately followed by the HTTP response.
However, if the client sends an incomplete request in a short packet,
its TCP stack might wait for this packet to be ACKed before sending
the rest of the request, delaying incoming requests by up to 40-200ms.

We can detect this undesirable situation when parsing the request :
  - if an incomplete request is received
  - if a full request is received and uses chunked encoding or advertises
    a content-length larger than the data available in the buffer

In these situations, we re-enable TCP quick-ack if we had previously
disabled it.
src/proto_http.c