You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create mapping between file system and HTTP interface #551
The index handler overrides the path from / to /index.html, but not all handlers “see” this change. Just like #496 makes the base path uniform, we should make the path uniform as well.
In general, handlers should not make any assumptions about the filenames on the system and the eventual URL in the HTTP interface. Also relevant for #257 (and its current workaround #584).
I wonder if Content-Location for a GET response could be a reasonable approach here. /foo would have Content-Location: /foo.{extension for an RDF mediatype} with corresponding Content-Type. It'll help with caching as well, as opposed to reserialising at runtime.
As for base URLs per RFC 7231, the representation passed through Content-Location will not affect the base URI resolution (unlike the situation in RFC 2616). See also discussion https://gitter.im/linkeddata/chat/archives/2017/05/04 . That's useful because we can indeed proceed to save the representation on disk with the extension, but use no-extension in the HTTP interface (beside Content-Location).
Activity
RubenVerborgh commentedon Aug 17, 2017
Terms to look for are
req.originalUrl,req.path,res.locals.path.[-]Ensure handlers use the correct path[/-][+]Create mapping between file system and HTTP interface[/+]csarven commentedon Sep 20, 2017
Probably of interest to keep in mind:
I wonder if
Content-Locationfor a GET response could be a reasonable approach here./foowould haveContent-Location: /foo.{extension for an RDF mediatype}with correspondingContent-Type. It'll help with caching as well, as opposed to reserialising at runtime.As for base URLs per RFC 7231, the representation passed through
Content-Locationwill not affect the base URI resolution (unlike the situation in RFC 2616). See also discussion https://gitter.im/linkeddata/chat/archives/2017/05/04 . That's useful because we can indeed proceed to save the representation on disk with the extension, but use no-extension in the HTTP interface (besideContent-Location).RubenVerborgh commentedon Jul 19, 2018
Done in #643.