]> git.kaiwu.me - haproxy.git/commit
MEDIUM: cli: handle payload in CLI proxy
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 11 Dec 2018 15:10:57 +0000 (16:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Dec 2018 16:05:36 +0000 (17:05 +0100)
commitebf61804ef3b18075e44e2345c01a35588e721f9
tree2c7b461d5b0f98ad24e98d2307cd276795745788
parent3de09d5c7ed4f107ddb97fbe9ec8604e654c34d6
MEDIUM: cli: handle payload in CLI proxy

The CLI proxy was not handling payload. To do that, we needed to keep a
connection active on a server and to transfer each new line over that
connection until we receive a empty line.

The CLI proxy handles the payload in the same way that the CLI do it.

Examples:

   $ echo -e "@1;add map #-1 <<\n$(cat data)\n" | socat /tmp/master-socket -

   $ socat /tmp/master-socket readline
   prompt
   master> @1
   25130> add map #-1 <<
   + test test
   + test2 test2
   + test3 test3
   +

   25130>
include/types/stream.h
src/cli.c
src/stream.c