curl/lib
Stefan Eissing b940cb1566
ws: pause/unpause write handling
Websocket frames need to be written individualy, so that applications
can access the frame meta data correctly. This worked until the write
function triggered a pause. Remaining frames accumulated in the "out"
writer's buffer and on unpaused were written in one chunk.

ws decode writer will now stop writing frames when the client writer
is paused. To handle the writing of buffered raw data after an unpause,
client writers have gotten a new "flush" method.

Add pytest test_20_12 with a new client to check handling of pauses
and websocket frames.

Reported-by: Hendrik Hübner
Fixes #22273
Closes #22283
2026-07-12 18:06:21 +02:00
..
curlx tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
vauth gssapi: add support for Apple GSS Framework 2026-07-04 01:21:57 +02:00
vquic tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
vssh tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
vtls tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
.gitignore
altsvc.c tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
altsvc.h altsvc: use Curl_peer in processing 2026-06-26 14:12:53 +02:00
amigaos.c
amigaos.h
arpa_telnet.h
asyn-ares.c build: enable -Wformat-signedness, fix issues found 2026-06-10 15:14:08 +02:00
asyn-base.c
asyn-thrdd.c tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
asyn.h tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
bufq.c
bufq.h
bufref.c
bufref.h
cf-dns.c tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
cf-dns.h cf-dns: pass peer for result lookups 2026-06-16 23:15:43 +02:00
cf-h1-proxy.c build: enable -Wformat-signedness, fix issues found 2026-06-10 15:14:08 +02:00
cf-h1-proxy.h
cf-h2-proxy.c src: sync nghttp2 versions checks with current requirements 2026-06-17 14:37:54 +02:00
cf-h2-proxy.h
cf-haproxy.c tidy-up: miscellaneous 2026-06-09 11:07:55 +02:00
cf-haproxy.h
cf-https-connect.c cf-dns: pass peer for result lookups 2026-06-16 23:15:43 +02:00
cf-https-connect.h
cf-ip-happy.c lib: add "Curl_" prefix to two global functions 2026-07-02 12:36:07 +02:00
cf-ip-happy.h lib: add "Curl_" prefix to two global functions 2026-07-02 12:36:07 +02:00
cf-recvbuf.c websockets: buffer ugprade data at connection level 2026-06-22 08:54:50 +02:00
cf-recvbuf.h websockets: buffer ugprade data at connection level 2026-06-22 08:54:50 +02:00
cf-setup.c FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
cf-setup.h cf-setup: own source file 2026-06-15 15:55:58 +02:00
cf-socket.c socket: use name sockerr for socket error variables 2026-06-14 14:17:07 +02:00
cf-socket.h cf-socket: make Curl_addr2string static 2026-06-11 08:15:31 +02:00
cfilters.c websockets: buffer ugprade data at connection level 2026-06-22 08:54:50 +02:00
cfilters.h websockets: buffer ugprade data at connection level 2026-06-22 08:54:50 +02:00
CMakeLists.txt cmake: drop logic for GNU/kFreeBSD systems 2026-06-26 10:17:00 +02:00
config-mac.h
config-os400.h build: drop superfluous STDC_HEADERS macro 2026-06-29 11:11:16 +02:00
config-riscos.h
config-win32.h build: drop superfluous STDC_HEADERS macro 2026-06-29 11:11:16 +02:00
conncache.c conncache: connection alive checks intervals 2026-06-26 13:52:26 +02:00
conncache.h
connect.c altsvc: use Curl_peer in processing 2026-06-26 14:12:53 +02:00
connect.h altsvc: use Curl_peer in processing 2026-06-26 14:12:53 +02:00
content_encoding.c ws: pause/unpause write handling 2026-07-12 18:06:21 +02:00
content_encoding.h
cookie.c cookie: check __Secure- and __Host- case sensitively when read from file 2026-06-18 23:58:07 +02:00
cookie.h cookie: use origin scheme for secure context check 2026-06-15 22:30:14 +02:00
creds.c creds: create with empty user+pass 2026-06-17 07:54:11 +02:00
creds.h tidy-up: docs, comments, typos, whitespace 2026-06-26 11:36:09 +02:00
cshutdn.c
cshutdn.h
curl_addrinfo.c tidy-up: docs, comments, typos, whitespace 2026-06-26 11:36:09 +02:00
curl_addrinfo.h
curl_config-cmake.h.in TLS: drop support for TLS-SRP 2026-07-04 12:20:20 +02:00
curl_ctype.h
curl_endian.c tidy-up: miscellaneous 2026-06-14 20:10:28 +02:00
curl_endian.h
curl_fnmatch.c tidy-up: drop stray comparisons with literal zero 2026-06-10 15:15:54 +02:00
curl_fnmatch.h
curl_fopen.c
curl_fopen.h
curl_get_line.c
curl_get_line.h
curl_gethostname.c
curl_gethostname.h
curl_gssapi.c gssapi: add support for Apple GSS Framework 2026-07-04 01:21:57 +02:00
curl_gssapi.h
curl_hmac.h
curl_ldap.h
curl_md4.h
curl_md5.h
curl_memrchr.c
curl_memrchr.h
curl_ntlm_core.c tidy-up: miscellaneous 2026-06-14 20:10:28 +02:00
curl_ntlm_core.h
curl_printf.h
curl_range.c
curl_range.h
curl_sasl.c sasl: fix zero-length response encoding 2026-06-30 08:58:33 +02:00
curl_sasl.h
curl_setup.h TLS: drop support for TLS-SRP 2026-07-04 12:20:20 +02:00
curl_sha256.h
curl_sha512_256.c tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
curl_sha512_256.h
curl_share.c
curl_share.h
curl_sspi.c
curl_sspi.h
curl_threads.c
curl_threads.h
curl_trc.c tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
curl_trc.h
cw-out.c ws: pause/unpause write handling 2026-07-12 18:06:21 +02:00
cw-out.h
cw-pause.c ws: pause/unpause write handling 2026-07-12 18:06:21 +02:00
cw-pause.h ws: pause/unpause write handling 2026-07-12 18:06:21 +02:00
dict.c
dict.h
dllmain.c
dnscache.c tidy-up: miscellaneous 2026-06-09 11:07:55 +02:00
dnscache.h
doh.c doh: drop redundant curlx_dyn_free() call in doh_probe_done() 2026-06-22 21:04:45 +02:00
doh.h
dynhds.c
dynhds.h
easy.c multi: forbid curl_easy_pause from within multi socket callback 2026-06-26 13:43:48 +02:00
easy_lock.h
easygetopt.c
easyif.h
easyoptions.c
easyoptions.h
escape.c
escape.h
fake_addrinfo.c tidy-up: drop redundant != NULL syntax 2026-06-09 14:37:36 +02:00
fake_addrinfo.h
file.c
file.h
fileinfo.c
fileinfo.h
formdata.c formdata: replace stray camelcase local function names 2026-06-30 11:36:55 +02:00
formdata.h
ftp-int.h
ftp.c ws: pause/unpause write handling 2026-07-12 18:06:21 +02:00
ftp.h lib: add "Curl_" prefix to two global functions 2026-07-02 12:36:07 +02:00
ftplistparser.c tidy-up: drop stray comparisons with literal zero 2026-06-10 15:15:54 +02:00
ftplistparser.h
functypes.h tidy-up: prefer spelling 'flavor', where missing 2026-06-15 03:28:42 +02:00
getenv.c
getinfo.c
getinfo.h
gopher.c gopher: reject CR and LF in the selector 2026-06-26 23:09:43 +02:00
gopher.h
hash.c
hash.h
headers.c ws: pause/unpause write handling 2026-07-12 18:06:21 +02:00
headers.h
hmac.c
hostip.c build: enable -Wformat-signedness, fix issues found 2026-06-10 15:14:08 +02:00
hostip.h
hostip4.c tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
hostip6.c
hsts.c tidy-up: miscellaneous 2026-06-14 20:10:28 +02:00
hsts.h hsts: duplicate live HSTS data in curl_easy_duphandle 2026-06-09 16:51:47 +02:00
http.c tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
http.h chunked: reject invalid bytes in trailer 2026-06-08 13:56:10 +02:00
http1.c
http1.h
http2.c src: sync nghttp2 versions checks with current requirements 2026-06-17 14:37:54 +02:00
http2.h
http_aws_sigv4.c lib: hostname related cleanups 2026-06-26 22:50:38 +02:00
http_aws_sigv4.h
http_chunks.c ws: pause/unpause write handling 2026-07-12 18:06:21 +02:00
http_chunks.h
http_digest.c lib: transfer origin and proxy handling 2026-06-12 23:52:00 +02:00
http_digest.h
http_negotiate.c url: connection credentials origin 2026-06-16 15:57:10 +02:00
http_negotiate.h
http_ntlm.c url: connection credentials origin 2026-06-16 15:57:10 +02:00
http_ntlm.h
http_proxy.c http: trim custom header name before the Authorization drop 2026-06-26 14:50:04 +02:00
http_proxy.h lib: transfer origin and proxy handling 2026-06-12 23:52:00 +02:00
httpsrr.c
httpsrr.h doh: stricter HTTPS RNAME parsing 2026-06-22 09:53:14 +02:00
idn.c
idn.h
if2ip.c tidy-up: docs, comments, typos, whitespace 2026-06-26 11:36:09 +02:00
if2ip.h
imap.c sasl: fix zero-length response encoding 2026-06-30 08:58:33 +02:00
imap.h
ldap.c urlpieces: remove members that live in peers/creds 2026-06-26 14:39:40 +02:00
libcurl.def
libcurl.rc
libcurl.vers.in
llist.c
llist.h
macos.c
macos.h
Makefile.am
Makefile.inc websockets: buffer ugprade data at connection level 2026-06-22 08:54:50 +02:00
Makefile.soname
md4.c
md5.c mbedtls: replace memset() with psa_hash_operation_init() 2026-06-30 11:36:55 +02:00
memdebug.c tidy-up: drop redundant != NULL syntax 2026-06-09 14:37:36 +02:00
mime.c tidy-up: miscellaneous 2026-06-14 20:10:28 +02:00
mime.h
mprintf.c tidy-up: miscellaneous 2026-06-05 16:57:38 +02:00
mqtt.c mqtt: reject control bytes in the topic 2026-06-25 09:35:01 +02:00
mqtt.h
multi.c lib: fix 'ns' -> 'us' in trace messages 2026-06-27 00:26:36 +02:00
multi_ev.c multi: forbid curl_easy_pause from within multi socket callback 2026-06-26 13:43:48 +02:00
multi_ev.h
multi_ntfy.c
multi_ntfy.h
multihandle.h multi: forbid curl_easy_pause from within multi socket callback 2026-06-26 13:43:48 +02:00
multiif.h multi: forbid curl_easy_pause from within multi socket callback 2026-06-26 13:43:48 +02:00
netrc.c netrc: remember and check filename loaded 2026-06-08 13:53:02 +02:00
netrc.h
openldap.c openldap: handle Curl_sasl_continue() returns better 2026-06-29 22:22:52 +02:00
optiontable.pl tidy-up: add spaces around equal operators where missing 2026-06-11 19:52:01 +02:00
parsedate.c
parsedate.h
peer.c urlpieces: remove members that live in peers/creds 2026-06-26 14:39:40 +02:00
peer.h tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
pingpong.c pingpong: reject nul byte in server response line 2026-06-18 14:17:27 +02:00
pingpong.h
pop3.c sasl: fix zero-length response encoding 2026-06-30 08:58:33 +02:00
pop3.h
progress.c lib: fix 'ns' -> 'us' in trace messages 2026-06-27 00:26:36 +02:00
progress.h progress: fx CURLINFO time reporting 2026-06-07 14:39:10 +02:00
protocol.c
protocol.h
proxy.c proxy: optimized env lookups 2026-06-26 13:50:20 +02:00
proxy.h tidy-up: miscellaneous 2026-06-14 20:10:28 +02:00
psl.c tidy-up: drop redundant != NULL syntax 2026-06-09 14:37:36 +02:00
psl.h
rand.c tidy-up: miscellaneous 2026-06-09 11:07:55 +02:00
rand.h tidy-up: miscellaneous 2026-06-09 11:07:55 +02:00
ratelimit.c ratelimits: use minimal burst rate 2026-06-15 15:59:10 +02:00
ratelimit.h
request.c build: enable -Wformat-signedness, fix issues found 2026-06-10 15:14:08 +02:00
request.h
rtsp.c tidy-up: drop stray comparisons with literal zero 2026-06-10 15:15:54 +02:00
rtsp.h
select.c
select.h
sendf.c ws: pause/unpause write handling 2026-07-12 18:06:21 +02:00
sendf.h ws: pause/unpause write handling 2026-07-12 18:06:21 +02:00
setopt.c tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
setopt.h
setup-os400.h
setup-vms.h
setup-win32.h
sha256.c mbedtls: replace memset() with psa_hash_operation_init() 2026-06-30 11:36:55 +02:00
sigpipe.h
slist.c
slist.h
smb.c smb: constify strchr() result variable 2026-06-18 21:12:17 +02:00
smb.h
smtp.c sasl: fix zero-length response encoding 2026-06-30 08:58:33 +02:00
smtp.h
sockaddr.h cf-socket: make Curl_addr2string static 2026-06-11 08:15:31 +02:00
socketpair.c socket: use name sockerr for socket error variables 2026-06-14 14:17:07 +02:00
socketpair.h
socks.c tidy-up: typos, comment nits 2026-07-11 13:55:45 +02:00
socks.h
socks_gssapi.c gssapi: add support for Apple GSS Framework 2026-07-04 01:21:57 +02:00
socks_sspi.c tidy-up: docs, comments, typos, whitespace 2026-06-26 11:36:09 +02:00
splay.c
splay.h
strcase.c
strcase.h
strequal.c
strerror.c build: enable -Wformat-signedness, fix issues found 2026-06-10 15:14:08 +02:00
strerror.h
system_win32.c
system_win32.h
telnet.c tidy-up: syntax and code nits 2026-06-26 15:45:24 +02:00
telnet.h
tftp.c socket: use name sockerr for socket error variables 2026-06-14 14:17:07 +02:00
tftp.h
thrdpool.c
thrdpool.h
thrdqueue.c
thrdqueue.h
transfer.c tidy-up: docs, comments, typos, whitespace 2026-06-26 11:36:09 +02:00
transfer.h transfer: adapt Curl_xfer_is_secure() 2026-06-15 13:41:26 +02:00
uint-bset.c
uint-bset.h
uint-hash.c
uint-hash.h
uint-spbset.c
uint-spbset.h
uint-table.c
uint-table.h
url.c url: reject control codes in credentials set via CURLOPT 2026-07-04 12:28:29 +02:00
url.h conncache: connection alive checks intervals 2026-06-26 13:52:26 +02:00
urlapi-int.h urlpieces: remove members that live in peers/creds 2026-06-26 14:39:40 +02:00
urlapi.c tidy-up: syntax and code nits 2026-06-26 15:45:24 +02:00
urldata.h TLS: drop support for TLS-SRP 2026-07-04 12:20:20 +02:00
version.c TLS: drop support for TLS-SRP 2026-07-04 12:20:20 +02:00
ws.c ws: pause/unpause write handling 2026-07-12 18:06:21 +02:00
ws.h