haproxy/src
Christopher Faulet 0158bb23d7 BUG/MEDIUM: httpclient: Rework CLI I/O handler to handle full buffer cases
'httpclient' command does not properly handle full buffer cases. When the
response buffer is full, we exit to retry later. However, the context flags
are updated. It means when this happens, we may loose a part of the
response.

So now, flags are preserved when we fail to push data into the response
buffer. In addition, instead of dumping one part per call, we now try to
dump as much data as possible.

Finally, when there is no more data, because everything was dumped or
because we are waiting for more data from the HTTP client, the applet is
updated accordingly by calling applet_have_no_more_data(). Otherwise, when
some data are blocked, applet_putchk() already takes care to update the SE
flags. So, it is useless to call sc_need_room().

This patch should fix the issue #1723. It must be backported as far as
2.5. But a massive refactoring was performed in 2.6. So, for the 2.5 and
below, the patch will have to be adapted.
2022-06-01 17:20:57 +02:00
..
acl.c MINOR: acl: alphanumerically sort the ACL dump 2022-03-30 11:49:59 +02:00
action.c BUG/MINOR: rules: Fix check_capture() function to use the right rule arguments 2022-04-25 15:28:21 +02:00
activity.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
applet.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
arg.c MINOR: arg: Be able to forbid unresolved args when building an argument list 2021-09-30 16:37:05 +02:00
auth.c
backend.c CLEANUP: stconn: replace a few remaining occurrences of CS in comments or traces 2022-05-27 19:33:35 +02:00
base64.c BUG/MINOR: base64: base64urldec() ignores padding in output size check 2021-08-25 16:14:14 +02:00
cache.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
calltrace.c BUILD: calltrace: fix wrong include when building with TRACE=1 2022-04-19 08:23:30 +02:00
cbuf.c CLEANUP: tree-wide: remove a few rare non-ASCII chars 2022-03-04 08:58:32 +01:00
cfgcond.c MINOR: ssl: Add ssllib_name_startswith precondition 2021-10-13 11:28:08 +02:00
cfgdiag.c
cfgparse-global.c MINOR: config: Add "cluster-secret" new global keyword 2022-05-12 17:48:35 +02:00
cfgparse-listen.c MINOR: config: use the new bind_parse_args_list() to parse a "bind" line 2022-05-20 18:39:43 +02:00
cfgparse-quic.c MINOR: quic: Connection TX buffer setting renaming. 2022-05-30 09:59:26 +02:00
cfgparse-ssl.c MINOR: listener/ssl: set the SSL xprt layer only once the whole config is known 2022-05-20 18:41:55 +02:00
cfgparse-tcp.c CLEANUP: tree-wide: remove 25 occurrences of unneeded fcntl.h 2022-04-26 10:59:48 +02:00
cfgparse-unix.c CLEANUP: tree-wide: remove 25 occurrences of unneeded fcntl.h 2022-04-26 10:59:48 +02:00
cfgparse.c BUG/MINOR: peers: detect and warn on init_addr/resolvers/check/agent-check 2022-05-31 09:42:44 +02:00
channel.c CLEANUP: conn_stream: tree-wide rename to stconn (stream connector) 2022-05-27 19:33:34 +02:00
check.c CLEANUP: check: rename all occurrences of stconn "cs" to "sc" 2022-05-27 19:33:35 +02:00
chunk.c CLEANUP: chunks: release trash also in deinit 2022-04-27 17:55:41 +02:00
cli.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
clock.c REORG: thread/clock: move the clock parts of thread_info to thread_ctx 2021-10-08 17:22:26 +02:00
compression.c CLEANUP: compression: move the default setting of maxzlibmem to defaults 2022-04-25 19:42:43 +02:00
connection.c CLEANUP: connection: rename all occurrences of stconn "cs" to "sc" 2022-05-27 19:33:35 +02:00
cpuset.c BUILD: cpuset: do not use const on the source of CPU_AND/CPU_ASSIGN 2022-01-28 19:04:02 +01:00
debug.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
dgram.c
dict.c
dns.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
dynbuf.c REORG: thread/sched: move the last dynamic thread_info to thread_ctx 2021-10-08 17:22:26 +02:00
eb32sctree.c
eb32tree.c
eb64tree.c
ebimtree.c
ebistree.c
ebmbtree.c CLEANUP: assorted typo fixes in the code and comments 2021-08-16 12:37:59 +02:00
ebpttree.c
ebsttree.c
ebtree.c
errors.c CLEANUP: ring: pass the ring watch flags to ring_attach_cli(), not in ctx.cli 2022-05-06 18:13:36 +02:00
ev_epoll.c BUILD: pollers: use an initcall to register the pollers 2022-04-25 19:00:55 +02:00
ev_evports.c BUILD: pollers: use an initcall to register the pollers 2022-04-25 19:00:55 +02:00
ev_kqueue.c BUILD: pollers: use an initcall to register the pollers 2022-04-25 19:00:55 +02:00
ev_poll.c BUILD: pollers: use an initcall to register the pollers 2022-04-25 19:00:55 +02:00
ev_select.c BUILD: pollers: use an initcall to register the pollers 2022-04-25 19:00:55 +02:00
extcheck.c MINOR: ext-check: indicate the transport and protocol of a server 2022-05-13 16:06:29 +02:00
fcgi-app.c MEDIUM: http-ana: Add a proxy option to restrict chars in request header names 2022-05-16 16:00:26 +02:00
fcgi.c CLEANUP: Reapply ist.cocci with --include-headers-for-types --recursive-includes 2022-03-21 08:30:47 +01:00
fd.c BUILD: fd: disguise the fd_set_nonblock/cloexec result 2022-04-27 10:52:21 +02:00
filters.c CLEANUP: tree-wide: Remove any ref to stream-interfaces 2022-04-13 15:10:16 +02:00
fix.c CLEANUP: assorted typo fixes in the code and comments 2021-08-16 12:37:59 +02:00
flt_http_comp.c BUG/MEDIUM: compression: Don't forget to update htx_sl and http_msg flags 2022-04-15 16:22:33 +02:00
flt_spoe.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
flt_trace.c CLEANUP: Apply ist.cocci 2021-11-08 12:08:26 +01:00
freq_ctr.c CLEANUP: tree-wide: remove unneeded include time.h in ~20 files 2021-10-07 01:41:14 +02:00
frontend.c REORG: rename cs_utils.h to sc_strm.h 2022-05-27 19:33:35 +02:00
h1_htx.c BUG/MEDIUM: http: Properly reject non-HTTP/1.x protocols 2022-05-24 15:38:05 +02:00
h1.c CLEANUP: Reapply ist.cocci with --include-headers-for-types --recursive-includes 2022-03-21 08:30:47 +01:00
h2.c CLEANUP: Reapply ist.cocci with --include-headers-for-types --recursive-includes 2022-03-21 08:30:47 +01:00
h3_stats.c MINOR: h3: Add a statistics module for h3 2022-05-30 09:59:26 +02:00
h3.c BUG/MINOR: qpack: do not consider empty enc/dec stream as error 2022-05-31 15:35:06 +02:00
haproxy.c MINOR: quic: Clarifications about transport parameters value 2022-05-30 09:59:26 +02:00
hash.c
hlua_fcn.c CLEANUP: Add missing header to hlua_fcn.c 2022-05-17 11:40:33 +02:00
hlua.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
hpack-dec.c BUILD/DEBUG: hpack: use unsigned int in printf format in debug code 2022-04-12 08:40:38 +02:00
hpack-enc.c
hpack-huff.c OPTIM: hpack: read 32 bits at once when possible. 2022-04-01 17:29:06 +02:00
hpack-tbl.c BUILD/DEBUG: hpack-tbl: fix format string in standalone debug code 2022-04-12 08:30:08 +02:00
hq_interop.c CLEANUP: quic/h3: rename all occurrences of stconn "cs" to "sc" 2022-05-27 19:33:35 +02:00
http_acl.c
http_act.c REORG: stconn: rename conn_stream.{c,h} to stconn.{c,h} 2022-05-27 19:33:35 +02:00
http_ana.c CLEANUP: stream: rename all occurrences of stconn "cs" to "sc" 2022-05-27 19:33:35 +02:00
http_client.c BUG/MEDIUM: httpclient: Rework CLI I/O handler to handle full buffer cases 2022-06-01 17:20:57 +02:00
http_conv.c BUG/MEDIUM: http-conv: Fix url_enc() to not crush const samples 2022-04-08 10:12:59 +02:00
http_fetch.c REORG: rename cs_utils.h to sc_strm.h 2022-05-27 19:33:35 +02:00
http_htx.c CLEANUP: Destroy http_err_chunks members during deinit 2022-04-26 23:39:43 +02:00
http_rules.c BUILD: http: remove the two unused constructors in rules and ana 2022-04-25 19:26:26 +02:00
http.c MEDIUM: h1: enlarge the scope of accepted version chars with accept-invalid-http-request 2022-05-24 15:38:54 +02:00
htx.c BUG/MEDIUM: htx: Fix a possible null derefs in htx_xfer_blks() 2022-02-28 17:16:55 +01:00
init.c MINOR: init: add the pre-check callback 2022-04-22 15:45:47 +02:00
jwt.c BUG/MINOR: jwt: Memory leak if same key is used in multiple jwt_verify calls 2022-02-15 20:08:20 +01:00
lb_chash.c MINOR: server: replace the pendconns-related stuff with a struct queue 2021-06-22 18:43:14 +02:00
lb_fas.c MINOR: server: replace the pendconns-related stuff with a struct queue 2021-06-22 18:43:14 +02:00
lb_fwlc.c BUG/MEDIUM: leastconn: fix rare possibility of divide by zero 2021-09-22 07:24:02 +02:00
lb_fwrr.c CLEANUP: assorted typo fixes in the code and comments 2021-08-16 12:37:59 +02:00
lb_map.c MINOR: server: replace the pendconns-related stuff with a struct queue 2021-06-22 18:43:14 +02:00
listener.c MINOR: quic: QUIC transport parameters split. 2022-05-30 09:59:26 +02:00
log.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
lru.c BUILD/DEBUG: lru: fix printf format in debug code 2022-04-12 08:19:33 +02:00
mailers.c BUG/MINOR: mailers: negotiate SMTP, not ESMTP 2022-02-17 15:45:59 +01:00
map.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
mjson.c
mqtt.c MEDIUM: mqtt: support mqtt_is_valid and mqtt_field_value converters for MQTTv3.1 2022-03-22 09:25:52 +01:00
mux_fcgi.c BUILD: htx: use the unchecked version of htx_get_head_blk() where needed 2022-05-30 16:27:48 +02:00
mux_h1.c CLEANUP: muxes: Consider stream's sd as defined in .show_fd callback functions 2022-05-30 08:45:16 +02:00
mux_h2.c CLEANUP: muxes: Consider stream's sd as defined in .show_fd callback functions 2022-05-30 08:45:16 +02:00
mux_pt.c CLEANUP: mux-pt: rename the "endp" field to "sd" 2022-05-27 19:33:35 +02:00
mux_quic.c MINOR: quic: QUIC transport parameters split. 2022-05-30 09:59:26 +02:00
mworker-prog.c BUILD: mworker: include tools.h for platforms without unsetenv() 2022-01-28 19:04:02 +01:00
mworker.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
namespace.c
ncbuf.c MINOR: ncbuf: adjust ncb_data with NCBUF_NULL 2022-05-31 14:31:48 +02:00
pattern.c CLEANUP: Add haproxy/xxhash.h to avoid modifying import/xxhash.h 2021-09-11 19:58:45 +02:00
payload.c CLEANUP: check: rename all occurrences of stconn "cs" to "sc" 2022-05-27 19:33:35 +02:00
peers.c CLEANUP: peers/cli: make peers_dump_peer() take an appctx instead of an stconn 2022-05-31 08:55:54 +02:00
pipe.c
pool.c REORG: stconn: rename conn_stream.{c,h} to stconn.{c,h} 2022-05-27 19:33:35 +02:00
proto_quic.c MINOR: protocol: replace ctrl_type with xprt_type and clarify it 2022-05-20 18:39:43 +02:00
proto_sockpair.c MINOR: protocol: replace ctrl_type with xprt_type and clarify it 2022-05-20 18:39:43 +02:00
proto_tcp.c MINOR: protocol: replace ctrl_type with xprt_type and clarify it 2022-05-20 18:39:43 +02:00
proto_udp.c MINOR: protocol: replace ctrl_type with xprt_type and clarify it 2022-05-20 18:39:43 +02:00
proto_uxdg.c MINOR: protocol: replace ctrl_type with xprt_type and clarify it 2022-05-20 18:39:43 +02:00
proto_uxst.c MINOR: protocol: replace ctrl_type with xprt_type and clarify it 2022-05-20 18:39:43 +02:00
protocol.c MINOR: protocol: replace ctrl_type with xprt_type and clarify it 2022-05-20 18:39:43 +02:00
proxy.c MINOR: quic: QUIC transport parameters split. 2022-05-30 09:59:26 +02:00
qpack-dec.c BUG/MINOR: qpack: do not consider empty enc/dec stream as error 2022-05-31 15:35:06 +02:00
qpack-enc.c BUG/MINOR: qpack: support bigger prefix-integer encoding 2022-05-30 14:30:05 +02:00
qpack-tbl.c CLEANUP: tree-wide: remove a few rare non-ASCII chars 2022-03-04 08:58:32 +01:00
queue.c CLEANUP: stream: rename "csf" and "csb" to "scf" and "scb" 2022-05-27 19:33:34 +02:00
quic_cc_newreno.c CLEANUP: quic: Remove window redundant variable from NewReno algorithm state struct 2022-03-04 17:47:32 +01:00
quic_cc.c CLEANUP: tree-wide: remove a few rare non-ASCII chars 2022-03-04 08:58:32 +01:00
quic_frame.c CLEANUP: quic: wrong use of eb*entry() macro 2022-05-12 17:48:35 +02:00
quic_loss.c MINOR: quic_stats: Add transport new counters (lost, stateless reset, drop) 2022-05-30 09:59:26 +02:00
quic_sock.c MINOR: quic: Move quic_lstnr_dgram_dispatch() out of xprt_quic.c 2022-05-20 16:57:12 +02:00
quic_stats.c MINOR: quic_stats: Add transport new counters (lost, stateless reset, drop) 2022-05-30 09:59:26 +02:00
quic_stream.c CLEANUP: quic: drop the name "conn_stream" from the pool variable names 2022-05-27 19:33:35 +02:00
quic_tls.c MINOR: quic_tls: Add quic_tls_decrypt2() implementation 2022-05-20 16:57:12 +02:00
quic_tp.c MINOR: quic: Clarifications about transport parameters value 2022-05-30 09:59:26 +02:00
raw_sock.c MINOR: tree-wide: always consider EWOULDBLOCK in addition to EAGAIN 2022-04-25 20:32:15 +02:00
regex.c
resolvers.c CLEANUP: stats: rename all occurrences of stconn "cs" to "sc" 2022-05-27 19:33:35 +02:00
ring.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
sample.c BUG/MEDIUM: sample: Fix adjusting size in word converter 2022-05-27 19:33:34 +02:00
server_state.c BUILD: server-state: avoid using not-so-portable isblank() 2022-01-28 19:04:02 +01:00
server.c MINOR: server: indicate when no address was expected for a server 2022-05-31 09:25:34 +02:00
session.c BUG/MINOR: session: fix theoretical risk of memleak in session_accept_fd() 2022-03-11 07:25:11 +01:00
sha1.c
shctx.c MINOR: shctx: add a few BUG_ON() for consistency checks 2021-11-19 19:25:13 +01:00
signal.c
sink.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
slz.c IMPORT: slz: use the correct CRC32 instruction when running in 32-bit mode 2021-12-06 09:14:20 +01:00
sock_inet.c CLEANUP: tree-wide: use fd_set_nonblock() and fd_set_cloexec() 2022-04-26 10:59:48 +02:00
sock_unix.c CLEANUP: tree-wide: use fd_set_nonblock() and fd_set_cloexec() 2022-04-26 10:59:48 +02:00
sock.c MINOR: connection: get rid of the CO_FL_ADDR_*_SET flags 2022-05-02 17:47:46 +02:00
ssl_ckch.c BUG/MEDIUM: ssl_ckch: Rework 'commit ssl ca-file' to handle full buffer cases 2022-06-01 17:20:57 +02:00
ssl_crtlist.c BUG/MEDIUM: ssl/crt-list: Rework 'add ssl crt-list' to handle full buffer cases 2022-06-01 17:20:57 +02:00
ssl_sample.c CLEANUP: check: rename all occurrences of stconn "cs" to "sc" 2022-05-27 19:33:35 +02:00
ssl_sock.c MINOR: quic: QUIC transport parameters split. 2022-05-30 09:59:26 +02:00
ssl_utils.c CLEANUP: Add missing header to ssl_utils.c 2022-05-17 11:40:33 +02:00
stats.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
stconn.c CLEANUP: stconn: remove the new unneeded SE_FL_APP_MASK 2022-05-27 19:33:35 +02:00
stick_table.c CLEANUP: applet: rename appctx_cs() to appctx_sc() 2022-05-27 19:33:35 +02:00
stream.c BUILD: htx: use the unchecked version of htx_get_head_blk() where needed 2022-05-30 16:27:48 +02:00
task.c BUG/MAJOR: sched: prevent rare concurrent wakeup of multi-threaded tasks 2022-02-14 20:10:43 +01:00
tcp_act.c REORG: rename cs_utils.h to sc_strm.h 2022-05-27 19:33:35 +02:00
tcp_rules.c REORG: stconn: rename conn_stream.{c,h} to stconn.{c,h} 2022-05-27 19:33:35 +02:00
tcp_sample.c CLEANUP: check: rename all occurrences of stconn "cs" to "sc" 2022-05-27 19:33:35 +02:00
tcpcheck.c CLEANUP: tcpcheck: Remove useless test on the stream-connector in tcpcheck_main 2022-05-30 08:37:40 +02:00
thread.c CLEANUP: tree-wide: remove 25 occurrences of unneeded fcntl.h 2022-04-26 10:59:48 +02:00
time.c REORG: time: move time-keeping code and variables to clock.c 2021-10-08 17:22:26 +02:00
tools.c REORG: stconn: rename conn_stream.{c,h} to stconn.{c,h} 2022-05-27 19:33:35 +02:00
trace.c BUG/MEDIUM: trace: avoid race condition when retrieving session from conn->owner 2022-03-18 17:43:28 +01:00
uri_auth.c
uri_normalizer.c
vars.c CLEANUP: vars: move the per-process variables initialization to vars.c 2022-02-23 17:11:33 +01:00
version.c
wdt.c BUG/MEDIUM: wdt: don't trigger the watchdog when p is unitialized 2022-05-13 11:28:08 +02:00
xprt_handshake.c BUILD: xprt: use an initcall to register the transport layers 2022-04-25 19:18:24 +02:00
xprt_quic.c CLEANUP: quic: remove useless check on local UNI stream reception 2022-05-31 15:21:13 +02:00