Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken relative file links in directory listing #13

Closed
DeltaF1 opened this issue Aug 2, 2020 · 2 comments
Closed

Broken relative file links in directory listing #13

DeltaF1 opened this issue Aug 2, 2020 · 2 comments

Comments

@DeltaF1
Copy link
Contributor

DeltaF1 commented Aug 2, 2020

When accessing a URL such as hyper://94f0cab7f60fcc2a711df11c85db5e0594d11e8a3efd04a06f46a3c34d03c418/posts and omitting the trailing slash, the browser does not append a trailing slash, and so relative links on the page don't function as intended.

Steps to reproduce

  • Access a URL to a directory with files in a hyperdrive/dat archive and omit the trailing slash
  • Click one of the links to a file in the directory

Expected behaviour

  • The filename is appended to the URL with a slash in between and the user navigates to the file

Actual behaviour

  • The browser does not append the trailing slash to the URL in the navbar, and the link becomes relative to one layer higher than intended
@DeltaF1
Copy link
Contributor Author

DeltaF1 commented Aug 3, 2020

This should maybe be moved to dat-fetch so that dat-fetch can return a 302 and redirect to the canonical version with the trailing '/' if it is a directory.

@DeltaF1
Copy link
Contributor Author

DeltaF1 commented Aug 4, 2020

I'll re-open on dat-fetch when I have a better idea of how I would want this to work. Maybe the directory listing page in agregore should just create links relative to the root rather than relative to ..

@DeltaF1 DeltaF1 closed this as completed Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant