Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPS transfer stalled when using pause/continue #4966

Closed
andrsbub opened this issue Feb 21, 2020 · 2 comments · Fixed by sthagen/curl-curl#106
Closed

HTTPS transfer stalled when using pause/continue #4966

andrsbub opened this issue Feb 21, 2020 · 2 comments · Fixed by sthagen/curl-curl#106
Assignees
Labels

Comments

@andrsbub
Copy link

I did this

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.

libcurl version

libcurl/7.65.3 OpenSSL/1.1.1c zlib/1.2.11 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.0.5) libssh/0.9.0/openssl/zlib nghttp2/1.39.2 librtmp/2.3

operating system

Linux hilbert 5.3.0-26-generic #28-Ubuntu SMP Wed Dec 18 05:37:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

@bagder bagder added the HTTP label Feb 24, 2020
@bagder
Copy link
Member

bagder commented Feb 26, 2020

@andrsbub also posted an example code that can reproduce this issue when he posted to the mailing list

bagder added a commit that referenced this issue Feb 28, 2020
... since the socket might not actually be readable anymore when for
example the data is already buffered in the TLS layer.

Fixes #4966
Reported-by: Anders Berg
@bagder bagder self-assigned this Feb 28, 2020
@bagder bagder closed this as completed in fa0216b Feb 29, 2020
bagder added a commit that referenced this issue Mar 5, 2020
This reverts commit fa0216b (from #5000)

Clearly that didn't solve the problem correctly.

Reported-by: Christopher Reid
Reopens #4966
Fixes #5044
@bagder
Copy link
Member

bagder commented Mar 6, 2020

The fix was reverted, this issue is back.

@bagder bagder reopened this Mar 6, 2020
bagder added a commit that referenced this issue Mar 6, 2020
There might be data available that was already read off the socket, for
example in the TLS layer.

Reported-by: Anders Berg
Fixes #4966
@bagder bagder closed this as completed in e040146 Mar 7, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.