RangerMauve / hypercore-fetch

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

Add failing test to demonstrate uri-encoding #55

Closed josephmturner closed 1 year ago

josephmturner commented 1 year ago

I'm assuming that the Link header should have a space and not %20? Feel free to close this if this behavior is expected.

If this is actually an issue, this is still a quick and dirty test. If you want me to split it out into a separate test, lmk.

RangerMauve commented 1 year ago

So, according to the HTTP spec, the URI in a Link header must be percent encoded. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link

Applications should be decoding the URI after fetching it from between the brackets. This is probably to account for spaces separating data in the header.

RangerMauve commented 1 year ago

Ruh roh, might be messing up upon writing the file actually.

RangerMauve commented 1 year ago

Fixed in 9.0.7

josephmturner commented 1 year ago

Confirmed working. Thank you!!