]> git.ipfire.org Git - thirdparty/curl.git/commit
ratelimit: redesign
authorStefan Eissing <stefan@eissing.org>
Tue, 11 Nov 2025 13:26:48 +0000 (14:26 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 24 Nov 2025 22:34:05 +0000 (23:34 +0100)
commit24b36fdd1585ea22e5e1f00791f1c20423433cde
tree0f1aeeb24e073189822a9f3afcf745ccaf353d76
parentbfde7811213d482789683094510f0680ee0291e4
ratelimit: redesign

Description of how this works in `docs/internal/RATELIMITS.ms`.

Notable implementation changes:
- KEEP_SEND_PAUSE/KEEP_SEND_HOLD and KEEP_RECV_PAUSE/KEEP_RECV_HOLD
  no longer exist. Pausing is down via blocked the new rlimits.
- KEEP_SEND_TIMED no longer exists. Pausing "100-continue" transfers
  is done in the new `Curl_http_perform_pollset()` method.
- HTTP/2 rate limiting implemented via window updates. When
  transfer initiaiting connection has a ratelimit, adjust the
  initial window size
- HTTP/3 ngtcp2 rate limitin implemnented via ack updates
- HTTP/3 quiche does not seem to support this via its API
- the default progress-meter has been improved for accuracy
  in "current speed" results.

pytest speed tests have been improved.

Closes #19384
48 files changed:
docs/Makefile.am
docs/internals/RATELIMITS.md [new file with mode: 0644]
lib/Makefile.inc
lib/cf-h1-proxy.c
lib/file.c
lib/ftp.c
lib/http.c
lib/http.h
lib/http2.c
lib/imap.c
lib/ldap.c
lib/multi.c
lib/multi_ev.c
lib/multiif.h
lib/pingpong.c
lib/pop3.c
lib/progress.c
lib/progress.h
lib/ratelimit.c [new file with mode: 0644]
lib/ratelimit.h [new file with mode: 0644]
lib/request.c
lib/request.h
lib/rtsp.c
lib/select.c
lib/select.h
lib/sendf.c
lib/setopt.c
lib/smtp.c
lib/speedcheck.c [deleted file]
lib/speedcheck.h [deleted file]
lib/telnet.c
lib/tftp.c
lib/transfer.c
lib/transfer.h
lib/url.c
lib/urldata.h
lib/vquic/curl_ngtcp2.c
lib/vssh/libssh.c
lib/vssh/libssh2.c
lib/vtls/schannel.c
lib/ws.c
tests/data/Makefile.am
tests/data/test3216 [new file with mode: 0644]
tests/http/test_02_download.py
tests/http/test_07_upload.py
tests/unit/Makefile.inc
tests/unit/unit1606.c
tests/unit/unit3216.c [new file with mode: 0644]