-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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 Post of a given size timeouts after curl ends up in an infinite loop #15688
Comments
@icing since you authored #c90a3f1 maybe you will see clearer into this ? |
icing
added a commit
to icing/curl
that referenced
this issue
Dec 5, 2024
The base64 mime encoder stalls when it cannot encode a full 3 byte input set into the read buffer. The workaround for this limitation was incomplete and could lead to stalled transfers when the last chunk to upload was smaller than 4 bytes. Use a tmp buffer on small reads to allow mime encoders more space to put their things. Add test case reproducing the issue and fix. refs curl#15688
Thanks for your precise report. I was able to reproduce the problem in a test case and made a fix in #15691. Hope this works for you as well. |
Thanks for the prompt feedback and fix. |
It will be part of curl 8.11.1 on December 11th. |
Excellent, many thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I did this
Create a file of the proper size (in my case the size that trigger the issue is 261680, it likely varies depending on the environment):
truncate -s 261680 test.tgz
Upload it to some http endpoint over SSL (nginx):
curl -v -X POST -Ffile=@test.tgz --url "https://domain.test/upload" --connect-timeout 30 --max-time 30;
The transfert timeout, using more verbose output ('-vvv'), we observe the following:
I highly suspect a relation with some code from commit c90a3f1:
I expected the following
Transfert should complete normally (as it did in the past using curl 8.6.0 or 8.8.0).
Issue seems occurring in curl >= 8.10.0.
curl/libcurl version
operating system
FreeBSD 14.2-STABLE
The text was updated successfully, but these errors were encountered: