url-normalize
url-normalize copied to clipboard
Crash when using unknown URL scheme with explicit port
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.