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

Problem associated with stripping the last / in the URL. #142

Open
WizzardSK opened this issue May 10, 2024 · 19 comments
Open

Problem associated with stripping the last / in the URL. #142

WizzardSK opened this issue May 10, 2024 · 19 comments
Labels
bug Something isn't working

Comments

@WizzardSK
Copy link

WizzardSK commented May 10, 2024

This issue had been modified as the root cause became more clear.

It appears that stripping the last / can cause problems for some servers:
#142 (comment)

Perhaps we need to add / at the end of the URL for directories.

From @WizzardSK

Maybe the problem is that some folders ending with ".com" remove that slash? I dont understand that.


Original text:

When I browse mounted folder which contains folder with dot in the name, it causes segfault:

Warning:src/link.c:893:Link_download_full: cannot retrieve URL: https://myserver/Tiger%20-%20Game.com, HTTP 404
./httpdirfs: line 11: 5282 Segmentation fault (core dumped) "$tmp_dir/ld-linux-x86-64.so.2" --library-path "$tmp_dir" "$tmp_dir/httpdirfs" "$@"

@fangfufu
Copy link
Owner

The segfault is due to HTTP 404, rather than having "." in the file name, I think. I cannot reproduce locally.

@WizzardSK
Copy link
Author

Ok, maybe you are right, can you please try on this folder? https://myrient.erista.me/files/No-Intro/Tiger%20-%20Game.com/

I mount just https://myrient.erista.me/files and then want to browse No-Intro folder

@fangfufu
Copy link
Owner

Sure, I will give it a go later today. :)

@fangfufu
Copy link
Owner

Hmm it hangs on my machine. Have you got a full log? When I manually kill it, it stops at Linktable_print.

@fangfufu
Copy link
Owner

Okay, I think the hanging might be due to some sort of rate limiting mechanism on the server. I cannot reproduce the problem you described. Which distro are you using?

@fangfufu
Copy link
Owner

Do you own that server, btw?

@WizzardSK
Copy link
Author

I am using Kubuntu 24.04. I do not own that server. Can attach full log later, not at the computer now. So it hangs on your system too on segfault?

@fangfufu
Copy link
Owner

For that particular server, you could consider using https://wiki.archlinux.org/title/CurlFtpFS

@fangfufu
Copy link
Owner

So it hangs on your system too on segfault?

It hangs, but it doesn't segfault.

@WizzardSK
Copy link
Author

WizzardSK commented May 11, 2024 via email

@fangfufu
Copy link
Owner

Ahh it appears to be related to the behaviour of stripping the last /.

Try and access these two links below:
https://myrient.erista.me/files/No-Intro/Tiger%20-%20Game.com/
https://myrient.erista.me/files/No-Intro/Tiger%20-%20Game.com

The hanging is related to accessing the link without the /.

@fangfufu fangfufu changed the title Folder with "." in name causes segmentation fault Problem associated with stripping the last /. May 11, 2024
@fangfufu fangfufu changed the title Problem associated with stripping the last /. Problem associated with stripping the last / in the URL. May 11, 2024
@fangfufu fangfufu added bug Something isn't working and removed cannot reproduce locally labels May 11, 2024
@WizzardSK
Copy link
Author

It indeed works weird. I cannot open that problematic folder without / on the end. But all other folders add that slash automatically and do not have that problem. Maybe the problem is that some folders ending with ".com" remove that slash? I dont understand that.

@fangfufu
Copy link
Owner

fangfufu commented May 11, 2024

This is related to PR #121

@fangfufu
Copy link
Owner

fangfufu commented May 11, 2024

@WizzardSK , well that web server you linked to is not "well-behaved", I can't quite replicate its behaviour on my local Apache, that server you pointed at crashes my httpdirfs every time.

On your system, what is its last LinkTable_print print out? I want to find out the URL associated with that directory entry.

@fangfufu fangfufu pinned this issue May 12, 2024
@WizzardSK
Copy link
Author

WizzardSK commented May 12, 2024

It depends of which folder I check the last.
When I use command line, I switcih to parent folder, it shows something like this: LinkTable_print: 338 D 0 iQue - iQue (Decrypted) https://myrient.erista.me/files/No-Intro/iQue%20-%20iQue%20%28Decrypted%29

Then when I switch to that bad fodler, I see this: Warning:src/link.c:893:Link_download_full: cannot retrieve URL: https://myrient.erista.me/files/No-Intro/Tiger%20-%20Game.com, HTTP 404

@fangfufu
Copy link
Owner

Could you post a full log please?

@WizzardSK
Copy link
Author

Ok, I tried that in Krusader this time to show how it crashes on segfault

log.txt

@fangfufu
Copy link
Owner

Cheers!

Btw, does the software crash on other servers that you use?

@WizzardSK
Copy link
Author

WizzardSK commented May 12, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants