BUG/MINOR: proxy: always initialize the trash in show servers state
authorWilly Tarreau <w@1wt.eu>
Wed, 1 Jul 2020 05:09:39 +0000 (07:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 1 Jul 2020 05:11:14 +0000 (07:11 +0200)
commitdf2a0305f24a58f56d44e1d12ea247a5ff243757
tree3ab53c7f60907bd3823ef66d844a43dd98065b88
parent6ff8143f7c87ad40d7369119467d779642702ad5
BUG/MINOR: proxy: always initialize the trash in show servers state

Actually the cleanup in commit 6ff8143f7 ("BUG/MINOR: proxy: fix
dump_server_state()'s misuse of the trash") allowed to spot that the
trash is never reset when dumping a servers state. I couldn't manage
to make it dump garbage even with large setups but didn't find either
where it's cleared between successive calls while other handlers do
explicitly invoke chunk_reset(), so it seems to happen a bit by luck.

Let's use chunk_printf() here for each turn, it makes things clearer.

This could be backported along with previous patch, especially if any
user reports occasional garbage appearing in the show servers output.
src/proxy.c