curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Pause/Continue HTTPS transfer

From: Anders Berg via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 21 Feb 2020 22:24:15 +0100

Hi,

I have an application that is (ab)using the pause/continue feature of
libcurl.
The application is having the CURLOPT_WRITEFUNCTION write the http data to a
small buffer, pausing the transfer when this buffer space is running low.
The
issue is that, on occasion, the transfer is not properly resumed after
calling
`curl_easy_pause(... CURLPAUSE_CONT)`. The buffer with the data that caused
the
CURL_WRITEFUNC_PAUSE return is always delivered, but no new data is
received.
The application is using the normal `curl_multi_perform()` to drive the
transfer.

I suspect that this failure to resume the transfer occurs when (or at least
has
something to do with) data is buffered in the SSL backend and select/poll
will
not return any events on the socket (either due to the server has
transmitted
all data for the request, or that the server can't send any more data due to
being limited by the TCP window).

Attached is a test program that hopefully demonstrates the phenomenon (at
least
it does for me ;-) Is there an issue here or have I missed something?

Regards,
Anders

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html

Received on 2020-02-21