When parsing https://example.com/a/c:/.., FireFox gives https://example.com/a/ while the URL crate gives https://example.com/a/c:/.
The shorten_path method seems to be correct except that it calls pop_path, which does nothing if the path segment to be popped is a windows drive letter.
The spec states that shortening a path should only leave a windows drive letter segment alone if it's the only segment in a file:// path, although FireFox seems to instead get that wrong by removing it anyway.
When parsing
https://example.com/a/c:/.., FireFox giveshttps://example.com/a/while the URL crate giveshttps://example.com/a/c:/.The
shorten_pathmethod seems to be correct except that it callspop_path, which does nothing if the path segment to be popped is a windows drive letter.The spec states that shortening a path should only leave a windows drive letter segment alone if it's the only segment in a
file://path, although FireFox seems to instead get that wrong by removing it anyway.