mod_zip icon indicating copy to clipboard operation
mod_zip copied to clipboard

Resuming download does not work with curl

Open msordi opened this issue 2 years ago • 0 comments

NGINX_VERSION=1.18.0 MOD_ZIP_VERSION=1.2.0

First, i start downloading my zip file using :

curl http://mod_zip_descriptor --output example.zip

All files have theirs CRC32.

Response headers :

< HTTP/1.1 200 OK
< Server: nginx/1.18.0
< Date: Wed, 29 Sep 2021 11:29:35 GMT
< Content-Type: application/zip
< Content-Length: 913341606
< Connection: keep-alive
< Last-Modified: Tue, 28 Sep 2021 15:31:38 GMT
< ETag: "6153355a-1574"
< Content-Disposition: attachment; filename=example.zip
< Accept-Ranges: bytes
< Cache-Control: max-age=0

I stop the download during the process to test resuming.

Then i try to resume it using automatic range :

curl http://mod_zip_descriptor -C - --output example.zip

Server say me : "HTTP server doesn't seem to support byte ranges. Cannot resume."

I try resuming it "manually" :

curl http://mod_zip_descriptor -H "Range: bytes=462135296-" --output example.zip

It hangs ... and fails!

I try using If-header:

curl http://mod_zip_descriptor -H "Range: bytes=462135296-" -H "If-Range: 6153355a-1574" --output example.zip

Download succeeds but restarts from the beginning.

Could you tell me if I have done anything wrong? Thanks.

msordi avatar Sep 29 '21 11:09 msordi