-
Notifications
You must be signed in to change notification settings - Fork 701
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
file+noindex
parsing is broken for Windows paths
#10703
Comments
It probably doesn't make much sense fixing this before #8889 goes in. |
Also this PR fixes the issue but in a slightly hacky way MercuryTechnologies#3. It was dropped in the end from what was merged into |
I don't think it make sense to support DOS filepaths. UNC paths could already work (I don't have windows machine to try). |
Also duplicate of #7065: looks like UNC paths do work! |
Thanks @phadej. I can try with UNC paths next week. Not sure if they need to be normalised or one can open a path |
@phadej It does not work with UNC paths:
No matter which combination of
|
Describe the bug
The
file+noindex
scheme is underspecified for Windows paths. It seems to follow thefile
scheme (RFC 8089), but Windows paths are not properly parsed bynetwork-uri
. A path likefile:///C:/some/path
should produce the pathC:/some/path
, however it produces/C:/some/path
.And if the last slash is removed, then the
C:
part is parsed as part of the auth:Just by luck, paths starting with
/
are interpreted as paths in the current drive so if we just happen to want that it might work.The right parsing would be what
file-uri
does:Which results in a path accessible from everywhere in the system. However this is not the end of the story because:
file-uri
only allowsfile:
schemes, it will not allowfile+noindex:
uris.file-uri
does not parse those.We can either define a parser for
file+noindex
from scratch, or do some tricks to parse the uri as anetwork-uri
uri, then fabricate an intermediate uri with thefile:
scheme and usefile-uri
or something else. I just didn't want this finding to go missing again.The text was updated successfully, but these errors were encountered: