-
Notifications
You must be signed in to change notification settings - Fork 59
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
Trailing slash in links not preserved #94
Comments
Coming back here after having filed #95, I realized that the trailing slash is the only way for httpdirfs to distinguish what's supposed to be a subdirectory and what's supposed to be a file (as even having a directory If that is really the case (and I did not miss any additional mechanism in here), just sending the trailing slash might indeed be a viable shortcut -- the "other examples" might still crop up, but then they'd be unrelated. (I.e., I'd still recommend remembering the full URI, but adding the slash that was already there in the requests would maybe solve some cases before we tackle the larger topic of ambiguously encoded |
Yes, this is one of the mechanism. |
This is probably resolved by 41cb4b8, let me know if the problem still occurs. |
Thanks for fixing this, it works fine now for the cases I previously had
troubles with.
|
Even when the server puts a trailing slash at a directory in the link (which eg. nginx and Python3's http.server do), httpdirfs still goes for the slash-less version.
Paraphrasing a wireshark capture:
This has three downsides:
If there's any way to store the original URI with the path component for each file and directory, that should probably be done. If there is no way to store these, I don't have any concrete suggestions (as adding the trailing slash causes the same trouble on servers that choose not to use a trailing slash, although they're probably rare for practical reasons). If it can be arranged but comes at some cost, I can probably come up with examples of other trouble that crop up if the originally encoded URI is not preserved ;-) (read: It's a larger discussion and several related threads which I don't want to bring in here if it can be resolved easily anyway).
[edit: pointing to known nginx and newly reported httpdirfs issues]
The text was updated successfully, but these errors were encountered: