curl_multi: resumed transfer is not completed although all data was received #3994
I did this
I am using libcurl with the multi interface (and libev) to receive data via http. Received data will be written to a relatively slow flash memory.
I noticed stuck transfers when the transfer is paused on the last invocation on the write callback, i.e. when the last chunk (in a non-http sense) of data is received. Once the transfer is resumed, it does not complete, although all data was received.
I observed the problem both when using
Restarting the transfer will deliver the remaining data, in case it was not consumed (by returning
The application is single-threaded.
I will submit a example to demonstrate the problem, based on the
Fetching a resource with a short body (single callback invocation) will demonstrate the problem, e.g. http://google.com.
I expected the following
The transfer shall complete once all data was received.
[curl -V output]
I tested current curl master as well as curl 7.40 and 7.29/7.30, all seem to show this problem.
Linux / Ubuntu 18.04
The text was updated successfully, but these errors were encountered:
Modified example in sstruchtrup/curl@e62b9f6
Output for http://google.com:
The transfer is complete, all 219 bytes were consumed, but no
... so that timeouts or other state machine actions get going again after a changing pause state. For example, if the last delivery was paused there's no pending socket activity. Reported-by: sstruchtrup on github Fixes #3994