]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stats: Fully consume large requests in the stats applet
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 27 Feb 2019 15:19:48 +0000 (16:19 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 19 Mar 2019 08:49:29 +0000 (09:49 +0100)
commit3a78aa6e95693c9102248a70ecc21f29a7489f5d
treef6ed4b0dd892c0ce9d342ae66884e5e0186286f2
parentadb363135c1b86410979dd66e548156c80a87cdb
BUG/MINOR: stats: Fully consume large requests in the stats applet

In the stats applet (in HTX and legacy HTTP), after a response is fully sent to
a client, the request is 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 for an unfinisehd
request.

Now, we consume request data 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. It should
probably be backported in prior versions too. But honnestly, with refactoring
on the connection layer and the stream interface in 1.9, it is probably safer
to not do so.
include/types/stats.h
src/stats.c