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
763 stars 59 forks source link

Cache mode doesn't work with escaped URL. #138

Closed fangfufu closed 4 months ago

fangfufu commented 5 months ago

Cache mode does not appear to work with escaped URL. This issue has appeared twice. The first time here: https://github.com/fangfufu/httpdirfs/issues/127

Found this URL with : in it that is apparently valid. Just logging it incase anyone tries the same thing. suse should probably be replacing : with %3A on there end. Httpdirfs seams to not be able to read theses links, likely similar to the spaces issue for %20 in urls.

The second time it appeared here: https://github.com/fangfufu/httpdirfs/issues/86#issuecomment-2041147955_

Please, how to mount the file with url containing spaces? when I mounted in escaped format, the file name is escaped too and cannot be opened in OS. When I provide URL non excaped, it does not mount (Error:src/network.c:163:curl_process_msgs: 3 - URL using bad/illegal format or missing URL)

The third time it appeared is here: https://github.com/fangfufu/httpdirfs/issues/128

Single file mode breaks when cache is enabled and URL has percent-encoding

Another appearance associated with single-file mode is here: https://github.com/fangfufu/httpdirfs/issues/99#issuecomment-1305492276

fangfufu commented 5 months ago

Some initial investigation results: https://github.com/fangfufu/httpdirfs/pull/123/files#r1587024220

This makes me wonder if the cache system has been broken on the master branch since last September...

fangfufu commented 5 months ago

This is related to: https://github.com/fangfufu/httpdirfs/issues/128

fangfufu commented 5 months ago

The root cause of the problem is labelled in this commit: https://github.com/fangfufu/httpdirfs/commit/3e7d9f0294bc3d5d1e2ccfea6b3b6047ddd1288c

I still need to resolve this.

fangfufu commented 5 months ago

Potentially fixed via 28293b5ccdc4f65e5721ba2fe978f1cff066d0d7. Needs more testing.

fangfufu commented 4 months ago

@WizzardSK, I think the issue had been resolved, please come and have a look.

fangfufu commented 4 months ago

The issue is not resolved for single-file-mode.

fangfufu commented 4 months ago

Duplicated here: https://github.com/fangfufu/httpdirfs/issues/99

WizzardSK commented 4 months ago

well, the problem was only in single-file mode

fangfufu commented 4 months ago

Fixed via 2fa2bb9cf068221b0fb625e600af8fe33f181214. Feel free to re-open the ticket if it doesn't work for you.