Skip to content

Path shortening is implemented incorrectly #1113

@Scripter17

Description

@Scripter17
  • Note that this crate implements the URL Standard not RFC 1738 or RFC 3986

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions