RangerMauve / hypercore-fetch

Implementation of Fetch that uses the Hyper SDK for loading p2p content
MIT License
36 stars 12 forks source link

Should `'Range'` header be set somewhere? #50

Closed josephmturner closed 1 year ago

josephmturner commented 1 year ago

What is the purpose of the 'Range' and 'Content-Range' headers? I don't see that the 'Range' header is set anywhere.

josephmturner commented 1 year ago

Which headers should provide the same information which previously was provided by the X-Blocks and X-Blocks-Downloaded headers?

RangerMauve commented 1 year ago

Range is set on the client side to load chunks of a file. 'Content-Rageis there to let the client know that that the Range request was satisfied and which data got loaded.Accept-Ranges` is how the server lets the client know that range requests may be made.

There currently isn't an equivalent to the X-Blocks and X-Blocks-Downloaded headers. I'm down to add them back in though!

josephmturner commented 1 year ago

Thank you for the explanation!

There currently isn't an equivalent to the X-Blocks and X-Blocks-Downloaded headers. I'm down to add them back in though!

Yes, please!! :)

josephmturner commented 1 year ago

Made an issue for it: https://github.com/RangerMauve/hypercore-fetch/issues/53

RangerMauve commented 1 year ago

Let's close this in favor of the new issue