Pull requests

#10 Merged
Repository
ianb
Branch
default

Fix parsing of paths with multiple slashes at the start

Author
  1. Richard Mitchell
Reviewers
Description

Previously, given a URL such as:

{{{http://localhost:6543//foo}}}

An error would be raised, rather than yielding the result of {{{/foo}}}, as expected.

This was because {{{urlparse.urlsplit}}} interprets the {{{//}}} at the start of the path as a delimiter for the scheme, rather than the path.

The fix prepends the path with a dummy scheme & netloc, to ensure that paths starting with multiple slashes are interpreted correctly.

  • Learn about pull requests

Comments (0)