fangfufu / httpdirfs

A filesystem which allows you to mount HTTP directory listings or a single file, with a permanent cache. Now with Airsonic / Subsonic support!
Other
764 stars 59 forks source link

Directories and files are shown twice #59

Closed extreme-sysadminning closed 3 years ago

extreme-sysadminning commented 3 years ago

I'm mounting a default apache dirlisting as a user, like so:

mkdir tecneeq
httpdirfs -f --cache -u dude -p secret https://tecneeq.server.com:3412/ tecneeq

But strangely, every entry, be it file or directory, is listed twice (both work as expected):

grafik

My environment:

kkruse@nb12615:~$ httpdirfs -V
HTTPDirFS version 1.1.10
FUSE library version: 2.9.9
fusermount3 version: 3.10.2
using FUSE kernel interface version 7.19
kkruse@nb12615:~$ uname -sr
Linux 5.10.0-4-amd64
kkruse@nb12615:~$ cat /etc/debian_version 
bullseye/sid
extreme-sysadminning commented 3 years ago

Compiled the latest git and updated my system, still the same problem:

image

Environment:

kkruse@nb12615:~$ httpdirfs -V
HTTPDirFS version 1.2.0
libcurl SSL engine: OpenSSL/1.1.1k
FUSE library version: 2.9.9
fusermount3 version: 3.10.2
using FUSE kernel interface version 7.19
kkruse@nb12615:~$ uname -sr
Linux 5.10.0-5-amd64
kkruse@nb12615:~$ cat /etc/debian_version
bullseye/sid
fangfufu commented 3 years ago

Could you possibly make this server accessible me, so I can investigate? Alternatively, could you tell me the server's configuration, please?

extreme-sysadminning commented 3 years ago

Sure, i sent you a login to your gmail account. Thanks a bunch for your time :-)

extreme-sysadminning commented 3 years ago

I think i found it, it's one of those options in my apache2.6 .htacces:

Options +Indexes IndexOptions FancyIndexing HTMLTable FoldersFirst IconsAreLinks NameWidth=* Charset=UTF-8

extreme-sysadminning commented 3 years ago

It's the IconsAreLinks option.

So there is a workaround: Remove IconsAreLinks option from IndexOptions.

fangfufu commented 3 years ago

If you look at the source code of the html, before you changed the settings, you can see that the links appear twice. I suppose I can work on removing duplicated links.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
--
  | <html>
  | <head>
  | <title>Index of /</title>
  | </head>
  | <body>
  | <h1>Index of /</h1>
  | <table>
  | <tr><th valign="top"><img src="/icons/blank.gif" alt="[ICO]"></th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr>
  | <tr><th colspan="5"><hr></th></tr>
  | <tr><td valign="top"><a href="dokus/"><img src="/icons/folder.gif" alt="[DIR]"></a></td><td><a href="dokus/">dokus/</a></td><td align="right">2021-03-28 00:33  </td><td align="right">  - </td><td>&nbsp;</td></tr>
  | <tr><td valign="top"><a href="ebooks/"><img src="/icons/folder.gif" alt="[DIR]"></a></td><td><a href="ebooks/">ebooks/</a></td><td align="right">2021-03-24 11:19  </td><td align="right">  - </td><td>&nbsp;</td></tr>
  | <tr><td valign="top"><a href="filme/"><img src="/icons/folder.gif" alt="[DIR]"></a></td><td><a href="filme/">filme/</a></td><td align="right">2021-03-31 10:27  </td><td align="right">  - </td><td>&nbsp;</td></tr>
  | <tr><td valign="top"><a href="games/"><img src="/icons/folder.gif" alt="[DIR]"></a></td><td><a href="games/">games/</a></td><td align="right">2020-11-15 16:41  </td><td align="right">  - </td><td>&nbsp;</td></tr>
  | <tr><td valign="top"><a href="learning/"><img src="/icons/folder.gif" alt="[DIR]"></a></td><td><a href="learning/">learning/</a></td><td align="right">2021-03-24 15:59  </td><td align="right">  - </td><td>&nbsp;</td></tr>
  | <tr><td valign="top"><a href="musik/"><img src="/icons/folder.gif" alt="[DIR]"></a></td><td><a href="musik/">musik/</a></td><td align="right">2021-03-22 09:40  </td><td align="right">  - </td><td>&nbsp;</td></tr>
  | <tr><td valign="top"><a href="serien/"><img src="/icons/folder.gif" alt="[DIR]"></a></td><td><a href="serien/">serien/</a></td><td align="right">2021-03-31 19:57  </td><td align="right">  - </td><td>&nbsp;</td></tr>
  | <tr><td valign="top"><a href="system/"><img src="/icons/folder.gif" alt="[DIR]"></a></td><td><a href="system/">system/</a></td><td align="right">2021-03-24 11:25  </td><td align="right">  - </td><td>&nbsp;</td></tr>
  | <tr><td valign="top"><a href="tinyfilemanager/"><img src="/icons/folder.gif" alt="[DIR]"></a></td><td><a href="tinyfilemanager/">tinyfilemanager/</a></td><td align="right">2020-12-16 09:43  </td><td align="right">  - </td><td>&nbsp;</td></tr>
  | <tr><th colspan="5"><hr></th></tr>
  | </table>
  | <address>Apache/2.4.46 (Debian) Server at tecneeq.cybercowboy.de Port 4711</address>
  | </body></html>
extreme-sysadminning commented 3 years ago

Cool, i'll leave the access for later testing for a few days.

Thanks mate :-)

fangfufu commented 3 years ago

It is okay, you can close the access now. I can configure my own apache to do the same thing. I probably won't have time to deal with this properly until I finish my PhD thesis anyways.

extreme-sysadminning commented 3 years ago

Ok then. Good luck :-)

fangfufu commented 3 years ago

@extreme-sysadminning , I know this is more than a year late, but I have fixed it. I think. Please test it out. At least it is working for the official Debian CD image server.