-
-
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 options --range and --continue-at clash without warning #15646
Comments
Allowing both just creates a transfer with behaviors no user can properly anticipate so better just deny the combo. Fixes #15646 Reported-by: Harry Sintonen
Could you please have a way for curl to work with both
Basically I'm requesting an override option, so that Thanks! |
Step 4 is an incorrect assumption though. The downloaded 5 bytes from step 2 are stored the output file but there is no trace of which offset those five bytes come. Trying resume that file will make curl ask to continue from offset 5 and onward to append to the already existing file. Which then makes it a broken file as a result. Ie, |
I don't see us adding support for that because it's something so niche that hardly anyone would use it. |
I use curl in a script that splits up a file hosted on very unreliable servers that is only accessible via certain proxies(that are also sometimes unreliable). Looks a bit like this.
Once the transfers are complete, I then Except for when the server/proxy flakes out. And then the script begins re-downloading the interrupted piece again. Hence my request for that particular option. If this is truly something that you feel would be so niche that hardly anyone would use it, fair enough. Thanks! |
That seems like logic your script should have. When you download a file in chunks, each chunk has a start offset and a size. If an individual chunk fails to get completely downloaded, you can do a second adjusted range request by adjusting the start offset and the size by checking how much of the chunk you got. |
This said, I've had this idea for a long while: Use multiple parallel transfers for a single download |
I think I'm already doing something like what he wants in #15333 |
I did this
curl --continue-at 2 --range 0-1 https://curl.se/robots.txt
I expected the following
Error being reported since the two options clash (any
--range
option is quietly overridden by the--continue-at
).curl/libcurl version
curl 8.11.0
operating system
Any
The text was updated successfully, but these errors were encountered: