]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: server: Be sure to cut the last parsed field of a server-state line
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Feb 2021 15:57:20 +0000 (16:57 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Feb 2021 17:03:59 +0000 (18:03 +0100)
commit868a5757e584431fafe713546c8ef8e799865476
treefe6013753b6ffcaf5b28fa014a00f743b982447e
parent06cd2569786d31ebb15832cb1053be9aaaadc3f7
BUG/MINOR: server: Be sure to cut the last parsed field of a server-state line

If a line of a server-state file has too many fields, the last one is not
cut on the first following space, as all other fileds. It contains all the
end of the line. It is not the expected behavior. So, now, we cut it on the
next following space, if any. The parsing loop was slighly rewritten.

Note that for now there is no error reported if the line is too long.

This patch may be backported at least as far as 2.1. On 2.0 and prior the
code is not the same. The line parsing is inlined in apply_server_state()
function.
src/server.c