cpp-netlib/uri

Copying an uri without host component crashes.

Closed this issue · 1 comments

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.

This is fixed in #81.