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

URL should normalize host according to spec #462

Open
estrattonbailey opened this issue Nov 22, 2023 · 1 comment
Open

URL should normalize host according to spec #462

estrattonbailey opened this issue Nov 22, 2023 · 1 comment

Comments

@estrattonbailey
Copy link

The URL implementation used by this library doesn't appear to normalize URL hostnames in the same way as the implementations of Node 18 and WHATWG.

Here's a repro: https://replit.com/@estrattonbailey/URL-normalization

whatwg-url-without-unicode doesn't have Issues enabled or I would have filed there.

The spec says this:

Although host is case-insensitive, producers and normalizers should use lowercase for registered names and hexadecimal addresses for the sake of uniformity, while only using uppercase letters for percent-encodings.

@charpeni
Copy link
Owner

Thanks for flagging this and thanks for the repro, it was really convenient!

I'm not sure where this is coming from and why the test missed it, probably related to unicode.

It seems like we should be able to normalize this within whatwg-url-without-unicode by lowercasing them.

Will have a look at it.

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