projects
/
haproxy-3.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0158bb2
)
MEDIUM: httpclient: Don't close CLI applet at the end of a response
author
Christopher Faulet
<cfaulet@haproxy.com>
Wed, 1 Jun 2022 15:17:24 +0000
(17:17 +0200)
committer
Christopher Faulet
<cfaulet@haproxy.com>
Wed, 1 Jun 2022 15:20:57 +0000
(17:20 +0200)
There is no reason to close the CLI applet when the whole response was
dumped. This prevent anyone to use the CLI in interactive mode.
src/http_client.c
patch
|
blob
|
history
diff --git
a/src/http_client.c
b/src/http_client.c
index
677161b
..
a195832
100644
(file)
--- a/
src/http_client.c
+++ b/
src/http_client.c
@@
-235,15
+235,16
@@
static int hc_cli_io_handler(struct appctx *appctx)
/* we must close only if F_END is the last flag */
if (ctx->flags == HC_CLI_F_RES_END) {
- sc_shutw(sc);
- sc_shutr(sc);
ctx->flags &= ~HC_CLI_F_RES_END;
+ goto end;
}
more:
if (!ctx->flags)
applet_have_no_more_data(appctx);
return 0;
+end:
+ return 1;
too_many_hdrs:
return cli_err(appctx, "Too many headers.\n");