I received this error trying to download a large (+5GB) ISO file:
downloading from <redacted>/<largefilename>:
-------------------- 0.0%bad status code 416
Other error? -1
-1 returned
-------------------- 0.0% 0.0 kBps aborted
failed to retrieve from <largefilename> -1
Steps to reproduce
Create two test files and corresponding .zsync files from /dev/random, one slightly smaller and one slightly larger than 2147483647 bytes. Here are mine:
large_file.2.0 is exactly 2103312397 bytes
large_file.2.2 is exactly 2286026765 bytes
large_file.2.0 downloads via zsync_curl without issue. Here is debug output when downloading large_file.2.2:
downloading from https://<redacted>/large_file.2.2:
<cert info redacted>
> GET <redacted>/large_file.2.2 HTTP/1.1
Range: bytes=0-18446744071700615167
Host: <redacted>
Accept: */*
< HTTP/1.1 416 Requested Range Not Satisfiable
< Date: Mon, 15 May 2017 19:03:57 GMT
< Server: Artifactory/<redacted>
< X-Artifactory-Id: <redacted>
< X-Artifactory-Node-Id: <redacted>
< Content-Range: bytes */2286026765
< Content-Length: 0
< Content-Type: application/x-troff-man
<
* Connection #2 to host <redacted> left intact
bad status code 416
Other error? -1
-1 returned
-------------------- 0.0% 0.0 kBps aborted
failed to retrieve from large_file.2.2 -1
Aborting, download available in large_file.2.2.part
verifying download...
Exit code: 2
Comments
I do not know C, but it seems that somewhere an INT for file size is being exceeded, a mathematical mystery occurs, then zsync_curl requests the first 18 Quintillion (and change) bytes of the file. My webserver responds with '416 Requested Range Not Satisfiable' because that's a lot of bytes to ask for.
Environment
Tested on latest commit to Master: 314ab4935c1cee6adec81e47d64ba1534e9c9555
Confirmed behavior on:
Symptom
I received this error trying to download a large (+5GB) ISO file:
Steps to reproduce
Create two test files and corresponding .zsync files from /dev/random, one slightly smaller and one slightly larger than 2147483647 bytes. Here are mine:
large_file.2.0 downloads via zsync_curl without issue. Here is debug output when downloading large_file.2.2:
Exit code: 2
Comments
I do not know C, but it seems that somewhere an INT for file size is being exceeded, a mathematical mystery occurs, then zsync_curl requests the first 18 Quintillion (and change) bytes of the file. My webserver responds with '416 Requested Range Not Satisfiable' because that's a lot of bytes to ask for.
Environment
Tested on latest commit to Master: 314ab4935c1cee6adec81e47d64ba1534e9c9555 Confirmed behavior on: