react-native-url-polyfill icon indicating copy to clipboard operation
react-native-url-polyfill copied to clipboard

URL should normalize host according to spec

Open estrattonbailey opened this issue 2 years ago • 1 comments

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.

estrattonbailey avatar Nov 22 '23 22:11 estrattonbailey