Skip to content

Copying an uri without host component crashes. #66

@rcane

Description

@rcane

The following will crash inside copy_range() when u is assigned to u2.

uri u("file:///foo");
uri u2 = u; // crashes

The problem is in the advance_parts() function that wrongly skips all three '/' after "file:" when it only should skip two because the third one belongs to the path component.

The root cause seems to be the same as in #64. The current implementation does not expect the host component to be empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions