Skip to content

Commit

Permalink
add support for an additional "ReferralServer"
Browse files Browse the repository at this point in the history
  • Loading branch information
jschauma committed Oct 7, 2024
1 parent 5630106 commit 324e016
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jswhois.go
Original file line number Diff line number Diff line change
Expand Up @@ -940,14 +940,18 @@ func askWhois(server, query string) (data map[string]interface{}) {
fallthrough
case "refer":
fallthrough
case "referralserver":
fallthrough
case "registrar whois server":
verbose(4, "Parsed \"%s\" referral to %s.", thisKey, currentValue)
t := currentValue
/* Sometimes a WHOIS server is listed as a URL. */
re := regexp.MustCompile(`^(https?://)([^/]+)/?$`)
re := regexp.MustCompile(`^(?:(https?|whois)://)([^/]+)/?$`)
if m := re.FindStringSubmatch(currentValue); m != nil {
t = m[2]
}
if t != server {
verbose(4, "nextWhois = %s", t)
nextWhois = t
}
}
Expand Down

0 comments on commit 324e016

Please sign in to comment.