Skip to content

gateway: raw-blob Content-Length, HEAD and Range from the first node's size claim #2616

Closed

Description

@thiras

Follow-up to #2593 (public gateway).

Today. A bundle entry with a size in its manifest answers HEAD with Content-Length, takes one Range (206/416) and advertises Accept-Ranges: bytes (#2612). A raw blob (GET /<hash> on the bare host, or /_decdn/<hash> on a site) streams with no length and ignores Range: nothing knows its size before a pull, and the gateway refuses to pay for a pull just to answer HEAD.

Ask. Raw-blob Content-Length, HEAD and Range without a manifest. The client learns the blob's size from the first node's signed size claim at the start of a pull, before any paid byte; hand that claim back to the gateway (e.g. BlobFetch.claim: oneshot::Sender<u64> filled from first_claim) so the response can set Content-Length, admit the request by its size against the allowance, and serve bytes=a-b through Streamer::open_range as entries do. HEAD on a raw blob would still cost the claim handshake (one probe, no bytes); say so in adr/appendix-gateway.md § Ranges, which currently documents the limitation.

Why. curl -r, resumed downloads and BEP 19 webseeds work on entries but not on bare hashes, and a download manager that sees no Content-Length shows no progress.

🤖 Generated with Claude Code

Activity

  1. self-assigned this
    on Oct 27, 2026
  2. moved this from Backlog to In progress in deCDNon Oct 27, 2026
  3. added a commit that references this issue on Oct 27, 2026
    f55f6c1
  4. moved this from In progress to Done in deCDNon Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions