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

Support for h5ai(HTML5 Apache Index) directory listing #107

Closed
mahfuzullah opened this issue Oct 19, 2022 · 4 comments
Closed

Support for h5ai(HTML5 Apache Index) directory listing #107

mahfuzullah opened this issue Oct 19, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@mahfuzullah
Copy link

h5ai (https://github.com/lrsjng/h5ai) is a file indexer/directory listing that is intended as a update of Apache DirectoryIndex, you can use it to read pdf/play mp3 on browser, etc etc.

a directory that i regularly mount using httpdirfs just updated to h5ai, but unfortunately httpdirfs does not support h5ai yet...

@mahfuzullah
Copy link
Author

the main difference between h5ai and Apache directory listing is instead of "/.." h5 uses "parent directory" which causes some sort of parsing error.

here's a demo site for replicating this behavior https://larsjung.de/h5ai/demo/

image

@fangfufu
Copy link
Owner

fangfufu commented Nov 7, 2022

Oh what you described is not a problem. The actual problem is that with h5ai, all the links start with /, HTTPDirFS assumes that no link starts with '/', and it uses the href attribute as the filename, rather than the text associated wit the a tag.

This is not exactly easy to fix - I need to change the way HTML_to_LinkTable (https://github.com/fangfufu/httpdirfs/blob/master/src/link.c#L391) works by getting it to grab link text rather than href link as the filename. Then I need to allow non-alphanumeric file name.

@fangfufu fangfufu added the enhancement New feature or request label Nov 7, 2022
fangfufu added a commit that referenced this issue Nov 7, 2022
fangfufu added a commit that referenced this issue Nov 7, 2022
@chrysn
Copy link
Contributor

chrysn commented Oct 1, 2023

With the introduction of make_link_relative in #121, this should work now.

@fangfufu
Copy link
Owner

fangfufu commented Oct 2, 2023

Closing this for now, feel free to reopen it.

@fangfufu fangfufu closed this as completed Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants