-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
curl_easy_perform() in curl 8.9.1 fails with OPERATION_TIMEOUT #14843
Comments
Thanks for your report. Indeed, this looks like an effect of the shutdown changes. What seems to happen:
I'll try to find the cause of the untimely TIMEOUT. Can you build a libcurl yourself for testing? |
I may be able to, but have not done it before. I am on Windows. If you can create a |
When ending an FTP upload, we shut down the connection gracefully, since the server should be notified we had send all bytes. Mostly, this is a NOP without TLS involved. With TLS, close-notify messages should be exchanged. As reported in curl#14843, not all servers seem to do that. Since it is the server's responsiblity to check it has received everything, we just log the timeout and proceed as if everything is fine. In the receive direction, we still fail the transfer if the server does not shut down its direction properly.
I made #14848 with a possible fix for your situation. What could be interesting is to see a trace when you add So far, I can only assume that the server is broken insofar as it does not shutdown the DATA connection properly. You notice the 2 second delay until the timeout on shutdown is reported. That is curl's default waiting time. Note: since we have a release tomorrow, we'll not merge the PR right away and you will not get it in our daily curl Windows builds. |
@icing thank you for looking into this! Please see the attached extended log output:
|
Thanks! This indeed shows that curl sends the TLS close-notify successfully, but the server just does not responds in the 2 seconds we allow for it. Then we time out. |
When ending an FTP upload, we shut down the connection gracefully, since the server should be notified we had send all bytes. Mostly, this is a NOP without TLS involved. With TLS, close-notify messages should be exchanged. As reported in curl#14843, not all servers seem to do that. Since it is the server's responsiblity to check it has received everything, we just log the timeout and proceed as if everything is fine. In the receive direction, we still fail the transfer if the server does not shut down its direction properly.
When ending an FTP upload, we shut down the connection gracefully, since the server should be notified we had send all bytes. Mostly, this is a NOP without TLS involved. With TLS, close-notify messages should be exchanged. As reported in curl#14843, not all servers seem to do that. Since it is the server's responsiblity to check it has received everything, we just log the timeout and proceed as if everything is fine. In the receive direction, we still fail the transfer if the server does not shut down its direction properly.
I did this
I am uploading a file to a Microsoft FTP Service using libcurl from C#. This has worked fine, but after updating to libcurl 8.9.1 it seems as if
curl_easy_perform()
now returnsOPERATION_TIMEOUT
. The call is going through a socks proxy (needed for me to access the FTP server due to firewall restrictions).I hope that you can use my description below, even though it is from C#. It is the the verbose output obtained through the
CURLoption.DEBUGFUNCTION
handler.Note that the file is actually uploaded - but, if I specify a
POSTQUOTE
to be run after the upload, then it is not executed.Let me know if there is some
CURLOption
that I can specify to help with diagnosing the issue further.I can do the same uploads to a
vsftpd
server without any issues.I believe this is related to #13904.
I expected the following
I expect the perform operation to not return an error, and if a
POSTQUOTE
is specified, to have it be executed.curl/libcurl version
libcurl 8.9.1 (this worked in libcurl 8.8.0)
operating system
I have tried both on Windows and alpine linux with verified libcurl 8.9.1
The text was updated successfully, but these errors were encountered: