o-development / ldo

Monorepo for Linked Data Objects (ldo)
MIT License
23 stars 5 forks source link

wrong base URI in case of a redirect #41

Open pchampin opened 2 months ago

pchampin commented 2 months ago

When URI1 redirects to URI2, getResource(URI1) follows the redirect, but seems to parse the content retrieved from URI2 with URI1 as the base URI, which IMO is incorrect (at least, if I judge from how browsers are interpreting relative URLs after a redirect).

elf-pavlik commented 1 month ago

response.url should be used as base.

The url read-only property of the Response interface contains the URL of the response. The value of the url property will be the final URL obtained after any redirects.