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

NormalizeURL does not perform IDNA normalization #27

Open
eliaslevy opened this issue Jan 4, 2019 · 1 comment
Open

NormalizeURL does not perform IDNA normalization #27

eliaslevy opened this issue Jan 4, 2019 · 1 comment

Comments

@eliaslevy
Copy link

eliaslevy commented Jan 4, 2019

IDNA normalization is only performed in NormalizeURLString, but that function returns a string. If you need a url.URL, you must then parse the result of NormalizeURLString, which means you are parsing the URL yet again, which is wasteful.

As NormalizeURLString calls NormalizeURL, the IDNA normalization in the former should be moved to the later, resulting in the URL passed to NormalizeURL having its host field IDNA normalized.

@mna
Copy link
Member

mna commented Jan 4, 2019

Hello Elias,

I think you're right, makes sense to me. I don't plan on working on purell in the near future, but happy to assist getting a PR merged that would address this.

Thanks,
Martin

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

2 participants