]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: lua: Fully consume large requests when an HTTP applet ends
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 27 Feb 2019 21:06:23 +0000 (22:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 19 Mar 2019 08:49:50 +0000 (09:49 +0100)
commit56a3d6e1f1aa35081f42dfa2e40b050b5a7b5dea
treeaaa7208336b8956c8eb16f34e25b426f5fbb2758
parent3a78aa6e95693c9102248a70ecc21f29a7489f5d
BUG/MEDIUM: lua: Fully consume large requests when an HTTP applet ends

In Lua, when an HTTP applet ends (in HTX and legacy HTTP), we must flush
remaining outgoing data on the request. But only outgoing data at time the
applet is called are consumed. 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.
src/hlua.c