]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: cache: Fully consume large requests in the cache applet
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 25 Feb 2019 10:40:49 +0000 (11:40 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 19 Mar 2019 08:49:08 +0000 (09:49 +0100)
commitadb363135c1b86410979dd66e548156c80a87cdb
tree5054de5b55b443916997faad6045431e0205d25d
parentf52170d2f47efbace729bc88349eb189968df568
BUG/MINOR: cache: Fully consume large requests in the cache applet

In the cache applet (in HTX and legacy HTTP), when an cached object is sent to a
client, the request must be consumed. It is done at the end, after all the
response was copied into the channel's buffer. But only outgoing data at time
the applet is called are consumed. Then the applet is closed. If a request with
a huge body is sent, an error is triggerred because a SHUTW is catched on an
unfinished request.

Now, we consume request data as soon as possible and we do it until the end. In
fact, we don't try to shutdown the request's channel for write anymore.

This patch must be backported to 1.9 after some observation period.
src/cache.c