Skip to content

Ability to force range requests and/or clever detection when range is supported #57

@robherley

Description

@robherley

👋 First off, this is a really neat utility!

I was testing this with a remote zip on Azure Blob that had a bunch of files in it.

I noticed that the range requests were not detected on the URL I was using:

$ ripunzip unzip-uri -v https://robstorage123.blob.core.windows.net/test/node_modules-v4.zip                                                                      

[2023-12-11T22:25:49Z WARN  ripunzip::unzip] HTTP(S) server does not support range requests - falling back to fetching whole file.

However Azure does support it, it just doesn't advertise Accept-Ranges:

$ curl --header "Range: bytes=0-0" -I https://robstorage123.blob.core.windows.net/test/node_modules-v4.zip
HTTP/1.1 200 OK
Content-Length: 7272289
Content-Type: application/zip
Content-MD5: EaCo5mkj/mtghpXLHQffgQ==
Last-Modified: Sat, 09 Dec 2023 21:17:48 GMT
ETag: 0x8DBF8FC4B60E2E7
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 66720a04-101e-0027-4402-2ef73a000000
x-ms-version: 2009-09-19
x-ms-lease-status: unlocked
x-ms-blob-type: BlockBlob
Date: Wed, 13 Dec 2023 20:28:24 GMT

Would it be possible to have an option to force a range request? Or perhaps doing a zero byte range head request on the target URL?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions