curl/lib
Stefan Eissing 80a3b830cc
http: expect 100 rework
Move all handling of HTTP's `Expect: 100-continue` feature into a client
reader. Add sending flag `KEEP_SEND_TIMED` that triggers transfer
sending on general events like a timer.

HTTP installs a `CURL_CR_PROTOCOL` reader when announcing `Expect:
100-continue`. That reader works as follows:

- on first invocation, records time, starts the `EXPIRE_100_TIMEOUT`
  timer, disables `KEEP_SEND`, enables `KEEP_SEND_TIMER` and returns 0,
  eos=FALSE like a paused upload.

- on subsequent invocation it checks if the timer has expired. If so, it
  enables `KEEP_SEND` and switches to passing through reads to the
  underlying readers.

Transfer handling's `readwrite()` will be invoked when a timer expires
(like `EXPIRE_100_TIMEOUT`) or when data from the server arrives. Seeing
`KEEP_SEND_TIMER`, it will try to upload more data, which triggers
reading from the client readers again. Which then may lead to a new
pausing or cause the upload to start.

Flags and timestamps connected to this have been moved from
`SingleRequest` into the reader's context.

Closes #13110
2024-03-18 12:41:56 +01:00
..
vauth digest: add check for hashing error 2024-03-07 10:24:27 +01:00
vquic vquic-tls: fix the error code returned for bad CA file 2024-03-13 02:03:18 -04:00
vssh lib: client reader polish 2024-03-08 13:11:17 +01:00
vtls mbedtls: fix pytest for newer versions 2024-03-18 12:37:00 +01:00
.checksrc
.gitattributes
.gitignore
altsvc.c lib: convert Curl_get_line to use dynbuf 2024-02-07 09:22:10 +01:00
altsvc.h
amigaos.c
amigaos.h
arpa_telnet.h
asyn-ares.c asyn-ares: fix data race warning 2024-03-07 16:47:36 +01:00
asyn-thread.c asyn-thread: use wakeup_close to close the read descriptor 2024-02-01 13:42:48 +01:00
asyn.h
base64.c
bufq.c bufq: writing into a softlimit queue cannot be partial 2024-03-03 17:35:47 +01:00
bufq.h lib: Curl_read/Curl_write clarifications 2024-02-28 12:58:55 +01:00
bufref.c
bufref.h
c-hyper.c http: expect 100 rework 2024-03-18 12:41:56 +01:00
c-hyper.h http: expect 100 rework 2024-03-18 12:41:56 +01:00
cf-h1-proxy.c http: revisit http_perhapsrewind() 2024-03-15 10:50:44 +01:00
cf-h1-proxy.h
cf-h2-proxy.c http: revisit http_perhapsrewind() 2024-03-15 10:50:44 +01:00
cf-h2-proxy.h
cf-haproxy.c lib: keep conn IP information together 2024-03-09 23:24:58 +01:00
cf-haproxy.h
cf-https-connect.c
cf-https-connect.h
cf-socket.c lib: keep conn IP information together 2024-03-09 23:24:58 +01:00
cf-socket.h lib: keep conn IP information together 2024-03-09 23:24:58 +01:00
cfilters.c lib: keep conn IP information together 2024-03-09 23:24:58 +01:00
cfilters.h misc: Fix typos in docs and lib 2024-03-01 09:59:48 +01:00
CMakeLists.txt
config-amigaos.h
config-dos.h
config-mac.h
config-os400.h
config-plan9.h
config-riscos.h
config-win32.h
config-win32ce.h
conncache.c lib: keep conn IP information together 2024-03-09 23:24:58 +01:00
conncache.h
connect.c lib: keep conn IP information together 2024-03-09 23:24:58 +01:00
connect.h lib: keep conn IP information together 2024-03-09 23:24:58 +01:00
content_encoding.c lib: replace readwrite with write_resp 2024-01-13 17:23:42 +01:00
content_encoding.h
cookie.c cookie: if psl fails, reject the cookie 2024-03-04 08:46:59 +01:00
cookie.h
curl_addrinfo.c
curl_addrinfo.h
curl_base64.h
curl_config.h.cmake cmake: add USE_OPENSSL_QUIC support 2024-03-05 17:07:57 +01:00
curl_ctype.h
curl_des.c misc: Fix typos in docs and lib 2024-03-01 09:59:48 +01:00
curl_des.h
curl_endian.c
curl_endian.h
curl_fnmatch.c
curl_fnmatch.h
curl_get_line.c lib: convert Curl_get_line to use dynbuf 2024-02-07 09:22:10 +01:00
curl_get_line.h lib: convert Curl_get_line to use dynbuf 2024-02-07 09:22:10 +01:00
curl_gethostname.c
curl_gethostname.h
curl_gssapi.c
curl_gssapi.h
curl_hmac.h
curl_krb5.h
curl_ldap.h
curl_md4.h
curl_md5.h
curl_memory.h
curl_memrchr.c
curl_memrchr.h
curl_multibyte.c
curl_multibyte.h
curl_ntlm_core.c
curl_ntlm_core.h
curl_ntlm_wb.c ntml_wb: fix buffer type typo 2024-02-01 13:04:56 +01:00
curl_ntlm_wb.h
curl_path.c
curl_path.h
curl_printf.h
curl_range.c
curl_range.h
curl_rtmp.c lib: send rework 2024-02-27 08:58:10 +01:00
curl_rtmp.h
curl_sasl.c sasl: make login option string override http auth 2024-01-26 02:58:21 -05:00
curl_sasl.h
curl_setup_once.h
curl_setup.h sha512_256: remove the cast macro, minor language/format edits 2024-02-20 17:49:01 +01:00
curl_sha256.h
curl_sha512_256.c sha512_256: add support for GnuTLS and OpenSSL 2024-03-07 10:25:11 +01:00
curl_sha512_256.h SHA-512/256: implement hash algorithm 2024-02-20 11:35:56 +01:00
curl_sspi.c
curl_sspi.h
curl_threads.c
curl_threads.h
curl_trc.c DoH: add trace configuration 2024-02-20 14:01:59 +01:00
curl_trc.h DoH: add trace configuration 2024-02-20 14:01:59 +01:00
curlx.h
cw-out.c TLS: start shutdown only when peer did not already close 2024-03-15 09:19:58 +01:00
cw-out.h lib: move client writer into own source 2024-02-26 14:25:41 +01:00
dict.c lib: Curl_read/Curl_write clarifications 2024-02-27 14:13:56 +01:00
dict.h
doh.c DoH: add trace configuration 2024-02-20 14:01:59 +01:00
doh.h DoH: add trace configuration 2024-02-20 14:01:59 +01:00
dynbuf.c build: delete/replace clang warning pragmas 2024-01-27 21:19:41 +00:00
dynbuf.h
dynhds.c
dynhds.h
easy_lock.h
easy.c lib: move 'done' parameter to SingleRequests 2024-03-11 23:27:02 +01:00
easygetopt.c curldown: Fix email address in Copyright 2024-02-28 11:28:10 +01:00
easyif.h lib: Curl_read/Curl_write clarifications 2024-02-27 14:13:56 +01:00
easyoptions.c curldown: Fix email address in Copyright 2024-02-28 11:28:10 +01:00
easyoptions.h
escape.c
escape.h
file.c TIMER_STARTTRANSFER: set the same for everyone 2024-03-05 17:06:47 +01:00
file.h
fileinfo.c
fileinfo.h
fopen.c fopen: fix narrowing conversion warning on 32-bit Android 2024-02-27 14:26:22 +01:00
fopen.h
formdata.c
formdata.h
ftp.c lib: keep conn IP information together 2024-03-09 23:24:58 +01:00
ftp.h
ftplistparser.c
ftplistparser.h
functypes.h
getenv.c
getinfo.c lib: keep conn IP information together 2024-03-09 23:24:58 +01:00
getinfo.h
gopher.c lib: Curl_read/Curl_write clarifications 2024-02-27 14:13:56 +01:00
gopher.h
hash.c
hash.h
headers.c http: move headers collecting to writer 2024-02-26 09:44:15 +01:00
headers.h http: move headers collecting to writer 2024-02-26 09:44:15 +01:00
hmac.c
hostasyn.c
hostip4.c
hostip6.c
hostip.c misc: Fix typos in docs and lib 2024-03-01 09:59:48 +01:00
hostip.h
hostsyn.c
hsts.c lib: convert Curl_get_line to use dynbuf 2024-02-07 09:22:10 +01:00
hsts.h
http1.c
http1.h
http2.c lib: move 'done' parameter to SingleRequests 2024-03-11 23:27:02 +01:00
http2.h
http_aws_sigv4.c
http_aws_sigv4.h
http_chunks.c http: expect 100 rework 2024-03-18 12:41:56 +01:00
http_chunks.h lib: Curl_read/Curl_write clarifications 2024-02-28 12:58:55 +01:00
http_digest.c
http_digest.h
http_negotiate.c
http_negotiate.h
http_ntlm.c
http_ntlm.h
http_proxy.c http_proxy: a blank CURLOPT_USERAGENT should not be used in CONNECT 2024-01-11 08:49:21 +01:00
http_proxy.h
http.c http: expect 100 rework 2024-03-18 12:41:56 +01:00
http.h http: expect 100 rework 2024-03-18 12:41:56 +01:00
idn.c
idn.h
if2ip.c
if2ip.h
imap.c mime: add client reader 2024-03-06 00:17:37 +01:00
imap.h
inet_ntop.c
inet_ntop.h
inet_pton.c
inet_pton.h
krb5.c lib: Curl_read/Curl_write clarifications 2024-02-27 14:13:56 +01:00
ldap.c lib: keep conn IP information together 2024-03-09 23:24:58 +01:00
libcurl.plist.in
libcurl.rc
libcurl.vers.in
llist.c
llist.h
macos.c
macos.h
Makefile.am
Makefile.inc lib: send rework 2024-02-27 08:58:10 +01:00
Makefile.mk
Makefile.soname
md4.c md4: include strdup.h for the memdup proto 2024-02-05 23:38:12 +01:00
md5.c
memdebug.c build: delete/replace clang warning pragmas 2024-01-27 21:19:41 +00:00
memdebug.h
mime.c http: expect 100 rework 2024-03-18 12:41:56 +01:00
mime.h mime: add client reader 2024-03-06 00:17:37 +01:00
mprintf.c misc: Fix typos in docs and lib 2024-03-01 09:59:48 +01:00
mqtt.c lib: Curl_read/Curl_write clarifications 2024-02-27 14:13:56 +01:00
mqtt.h mqtt, remove remaining use of data->state.buffer 2024-01-27 12:42:19 +01:00
multi.c lib: move 'done' parameter to SingleRequests 2024-03-11 23:27:02 +01:00
multihandle.h lib: further send/upload handling polish 2024-03-04 08:42:56 +01:00
multiif.h lib: further send/upload handling polish 2024-03-04 08:42:56 +01:00
netrc.c lib: convert Curl_get_line to use dynbuf 2024-02-07 09:22:10 +01:00
netrc.h
nonblock.c
nonblock.h
noproxy.c
noproxy.h
openldap.c lib: send rework 2024-02-27 08:58:10 +01:00
optiontable.pl curldown: Fix email address in Copyright 2024-02-28 11:28:10 +01:00
parsedate.c
parsedate.h
pingpong.c smpt: fix starttls 2024-03-05 13:30:16 +01:00
pingpong.h lib: send rework 2024-02-27 08:58:10 +01:00
pop3.c lib: send rework 2024-02-27 08:58:10 +01:00
pop3.h
progress.c
progress.h
psl.c
psl.h
rand.c lib: add debug log outputs for CURLE_BAD_FUNCTION_ARGUMENT 2024-01-08 22:48:24 +01:00
rand.h
rename.c
rename.h
request.c http: expect 100 rework 2024-03-18 12:41:56 +01:00
request.h http: expect 100 rework 2024-03-18 12:41:56 +01:00
rtsp.c http: expect 100 rework 2024-03-18 12:41:56 +01:00
rtsp.h
select.c
select.h
sendf.c http: expect 100 rework 2024-03-18 12:41:56 +01:00
sendf.h http: expect 100 rework 2024-03-18 12:41:56 +01:00
setopt.c lib: further send/upload handling polish 2024-03-04 08:42:56 +01:00
setopt.h
setup-os400.h
setup-vms.h
setup-win32.h
sha256.c
share.c
share.h
sigpipe.h
slist.c
slist.h
smb.c lib: further send/upload handling polish 2024-03-04 08:42:56 +01:00
smb.h lib: further send/upload handling polish 2024-03-04 08:42:56 +01:00
smtp.c http: expect 100 rework 2024-03-18 12:41:56 +01:00
smtp.h lib: further send/upload handling polish 2024-03-04 08:42:56 +01:00
sockaddr.h
socketpair.c
socketpair.h
socks_gssapi.c misc: Fix typos in docs and lib 2024-03-01 09:59:48 +01:00
socks_sspi.c
socks.c lib: keep conn IP information together 2024-03-09 23:24:58 +01:00
socks.h
speedcheck.c
speedcheck.h
splay.c
splay.h
strcase.c
strcase.h
strdup.c
strdup.h
strerror.c
strerror.h
strtok.c
strtok.h
strtoofft.c lib: initialize output pointers to NULL before calling strto[ff,l,ul] 2024-02-26 17:19:27 +01:00
strtoofft.h
system_win32.c
system_win32.h
telnet.c lib: Curl_read/Curl_write clarifications 2024-02-27 14:13:56 +01:00
telnet.h
tftp.c lib: further send/upload handling polish 2024-03-04 08:42:56 +01:00
tftp.h
timediff.c
timediff.h
timeval.c
timeval.h
transfer.c http: expect 100 rework 2024-03-18 12:41:56 +01:00
transfer.h lib: move 'done' parameter to SingleRequests 2024-03-11 23:27:02 +01:00
url.c http: expect 100 rework 2024-03-18 12:41:56 +01:00
url.h lib: keep conn IP information together 2024-03-09 23:24:58 +01:00
urlapi-int.h
urlapi.c lib: initialize output pointers to NULL before calling strto[ff,l,ul] 2024-02-26 17:19:27 +01:00
urldata.h http: expect 100 rework 2024-03-18 12:41:56 +01:00
version_win32.c
version_win32.h
version.c version: allow building with ancient libpsl 2024-02-06 09:50:35 +01:00
warnless.c
warnless.h
ws.c lib: client reader polish 2024-03-08 13:11:17 +01:00
ws.h lib: client reader polish 2024-03-08 13:11:17 +01:00