url-normalize icon indicating copy to clipboard operation
url-normalize copied to clipboard

Crash when using unknown URL scheme with explicit port

Open williamsjoblom opened this issue 1 year ago • 0 comments

When running the following snippet I get a KeyError: 'foo' in normalize_port with url-normalize 1.4.3:

import url_normalize
print(url_normalize.url_normalize('foo://localhost:1234/'))

README.md states the following:

For schemes that define a port, use an empty port if the default is desired

Since the placeholder scheme foo does not have a well-established default port, based on the above README excerpt I expect the snippet to print foo://localhost:1234/ and not crash.

williamsjoblom avatar Nov 23 '22 10:11 williamsjoblom