]> git.ipfire.org Git - thirdparty/curl.git/commit
curl: fix --upload-file . hangs if delay in STDIN
authorJohn Schroeder <john@schroederspace.com>
Tue, 26 Nov 2019 08:16:19 +0000 (09:16 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 26 Nov 2019 08:17:52 +0000 (09:17 +0100)
commit9a2cbf30b81a2b57149bb20e78e2e4cb5c2ff389
tree5c31ee04911407d843f17c31db412988f3154769
parent7cf18b05e04bbb0f08c74d2567b0648f6c31a952
curl: fix --upload-file . hangs if delay in STDIN

Attempt to unpause a busy read in the CURLOPT_XFERINFOFUNCTION.

When uploading from stdin in non-blocking mode, a delay in reading
the stream (EAGAIN) causes curl to pause sending data
(CURL_READFUNC_PAUSE).  Prior to this change, a busy read was
detected and unpaused only in the CURLOPT_WRITEFUNCTION handler.
This change performs the same busy read handling in a
CURLOPT_XFERINFOFUNCTION handler.

Fixes #2051
Closes #4599
Reported-by: bdry on github
src/tool_cb_prg.c
src/tool_cb_rea.c
src/tool_cb_rea.h
src/tool_operate.c
src/tool_operate.h
src/tool_progress.c