Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when using unknown URL scheme with explicit port #34

Open
williamsjoblom opened this issue Nov 23, 2022 · 0 comments
Open

Crash when using unknown URL scheme with explicit port #34

williamsjoblom opened this issue Nov 23, 2022 · 0 comments

Comments

@williamsjoblom
Copy link

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 williamsjoblom changed the title Unexpected crash when using unknown URL scheme with explicit port Crash when using unknown URL scheme with explicit port Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant