Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. (cherry picked from commit 5e205524ad24003ecc4dbb435066aebe7ed58d95)
- Loading branch information