]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: lua: send function fails and return bad bytes
authorThierry FOURNIER <tfournier@exceliance.fr>
Wed, 4 Mar 2015 10:44:47 +0000 (11:44 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Mar 2015 12:36:41 +0000 (13:36 +0100)
commit506e46c3520beeec1e00e0563f348f65adc28efe
tree408ef62c2bba429780aa4ad4a6054c7d6671eeed
parentd1039e5dc5a7d08ca4451155d363d62e236b85c2
BUG/MAJOR: lua: send function fails and return bad bytes

In some cases the Lua "send" function fails. This is caused by the
return of "buffer_replace2()" is not tested. I checked avalaible space
in the buffer and I supposed than "buffer_replace2()" took all the
data. In some cases, "buffer_replace2()" cannot take the incoming
data, it returns the amount of data copied.

This patch check the amount of data really copied by "buffer_replace2()"
and advance the buffer with taking this value in account.
src/hlua.c