0
votes

I am a noob in coding and only recently have started using cURL command.

I work in Windows and have downloaded cURL files from http://curl.haxx.se/download.html

Normally I use it for range-downloading. It works fine for all downloads below 2GB. But when I am trying to give any range above 2GB, it gives error as "416 Requested Range not satisfiable". I expect this error is coming for the 2GB limit.

This is what happens:

`curl --range 1048576000--1149239297 -o C:\Temp\newdownload.typ "https://dt76.energycdn.com/torrentdl/dkvOrv1Dkn5PtQncleZsAQ/1453988388/2443016/c92c744e39c125f433ce76fa87b3e043525b350b/Baahubali-The%20Beginning%20%282015%29%20-%201080p%20mHD%20-%20Blu-Ray%20-%20x264%20-%205.1%20AAC%20-%20Esubs%20%5BDDR%5D/Baahubali-The%20Beginning%20%282015%29%20-%201080p%20mHD%20-%20Blu-Ray%20-%20x264%20-%205.1%20AAC%20-%20Esubs%20%5BDDR%5D.mkv"`

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

100 212 100 212 0 0 82 0 0:00:02 0:00:02 --:--:-- 82

The 212 bytes file which got downloaded contains the following:

`<html>
<head><title>416 Requested Range Not Satisfiable</title></head>
<body bgcolor="white">
<center><h1>416 Requested Range Not Satisfiable</h1></center>
<hr><center>nginx/1.6.2</center>
</body>
</html>
`

I love cURL as a downloader but this limit is killing me. Plz help.

1
From what it looks like, the error is not related to curl but is related to nginx on the server you're trying to download a file from.fardjad
this is a server side messageMarged

1 Answers

2
votes

This is a server-side error, curl has no problems with file sizes up to 64bit on modern operating systems.

But your range looks wrong, you have two dashes (minuses) in the range string and that might cause the server to refuse you (possibly it considers the second number to be negative). Try --range 1048576000-1149239297.

Use curl's -v option to see exactly what it sends in its request and what server response headers it gets.

Finally: your example command line here is still below 2GB in both values...