From 324e0169861ab1782e3c1f4fd2fd19ddc9086601 Mon Sep 17 00:00:00 2001 From: Jan Schaumann Date: Sun, 6 Oct 2024 21:21:54 -0400 Subject: [PATCH] add support for an additional "ReferralServer" from @martinvonwittich in https://github.com/jschauma/jswhois/issues/5 --- jswhois.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jswhois.go b/jswhois.go index 572267c..a78d78b 100644 --- a/jswhois.go +++ b/jswhois.go @@ -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 } }