]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUG] stream_sock: try to flush any extra pending request data after a POST
authorWilly Tarreau <w@1wt.eu>
Tue, 28 Sep 2010 12:16:41 +0000 (14:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Oct 2010 17:04:30 +0000 (19:04 +0200)
commit58bd8fd46dae559694452a79370d7ebd5c10dce5
tree22640c03e77d9ab80dea2b8c96499829f4acef6f
parenta97e73a0a143e25a5f70d43e5b0bd57c4dfb6764
[BUG] stream_sock: try to flush any extra pending request data after a POST

Some broken browsers still happen to send a CRLF after a POST. Those which
send a CRLF in a second packet have it queued into the system's buffers,
which causes an RST to be emitted by some systems upon close of the response
(eg: Linux). The client may then receive the RST without the last response
segments, resulting in a truncated response.

This change leaves request polling enabled on a POST so that we can flush
any late data from the request buffers.

A more complete workaround would consist in reading from the request for a
long time, until we get confirmation that the close has been ACKed. This
is much more complex and should only be studied for newer versions.
(cherry picked from commit 12e316af4f0245fde12dbc224ebe33c8fea806b2)
src/proto_http.c