Skip to content

Commit

Permalink
fixed: .de with umlaut in both ASCII/Unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiIgna committed Feb 6, 2023
1 parent d5942b1 commit 5a7ffd1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/whoiser.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ const whoisTld = async (query, { timeout = 15000, raw = false, domainTld = '' }
return data
}

const whoisDomain = async (rawDomain, { host = null, timeout = 15000, follow = 2, raw = false, ignorePrivacy = true } = {}) => {
domain = punycode.toASCII(rawDomain)
const whoisDomain = async (domain, { host = null, timeout = 15000, follow = 2, raw = false, ignorePrivacy = true } = {}) => {
domain = punycode.toASCII(domain)
const [domainName, domainTld] = splitStringBy(domain.toLowerCase(), domain.lastIndexOf('.'))
let results = {}

Expand Down Expand Up @@ -150,7 +150,7 @@ const whoisDomain = async (rawDomain, { host = null, timeout = 15000, follow = 2

// hardcoded WHOIS queries..
if (host === 'whois.denic.de') {
query = `-T dn ${rawDomain}`
query = `-T dn ${punycode.toUnicode(domain)}`
} else if (host === 'whois.jprs.jp') {
query = `${query}/e`
}
Expand Down

0 comments on commit 5a7ffd1

Please sign in to comment.