Parsing a url like scheme:/.//path internally removes the ./ in the serialization (per the spec), so parsing the serialized URL of scheme://path yields a URL that is parsed differently than the original one (ie. path is treated as a host now, instead of part of the URL's path).
Cases to consider:
scheme:/.//path
scheme:/..//path
scheme:/./..//path (any leading mixed collection of ./ and ../)
My reading of the spec is that this might be a shortcoming that needs to be addressed there, rather than just an implementation bug. I can envision a couple possible solutions:
- don't truncate
./ or ../ if it's the first component of a path, avoiding the issue entirely
- truncate
/ when the previous segment is empty (resulting in scheme:/path)
Parsing a url like
scheme:/.//pathinternally removes the./in the serialization (per the spec), so parsing the serialized URL ofscheme://pathyields a URL that is parsed differently than the original one (ie. path is treated as a host now, instead of part of the URL's path).Cases to consider:
scheme:/.//pathscheme:/..//pathscheme:/./..//path(any leading mixed collection of./and../)My reading of the spec is that this might be a shortcoming that needs to be addressed there, rather than just an implementation bug. I can envision a couple possible solutions:
./or../if it's the first component of a path, avoiding the issue entirely/when the previous segment is empty (resulting inscheme:/path)