diff --git a/lib/url.js b/lib/url.js index a47b071..b1603a3 100644 --- a/lib/url.js +++ b/lib/url.js @@ -106,7 +106,7 @@ function parseHost(input, isUnicode) { } let domain = decodeURIComponent(input); - let asciiDomain = punycode.toASCII(domain); + let asciiDomain = punycode.toASCII(domain.toLowerCase()); if (domain.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1) { throw new TypeError("Invalid Host"); }