From dc3eeb8170f5123b3836e15f0388a956f6b3b3c2 Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Sun, 25 Jan 2015 03:18:19 +0100 Subject: [PATCH] Fix referrals handling for some verisign-grs.com servers Verisign has changed for no apparent reason the label for the whois server field of the cc, tv and jobs TLDs whois servers. --- whois.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/whois.c b/whois.c index fdb2824..d703996 100644 --- a/whois.c +++ b/whois.c @@ -810,9 +810,10 @@ char *query_crsnic(const int sock, const char *query) is queried */ if (state == 0 && strneq(buf, " Domain Name:", 15)) state = 1; - if (state == 1 && strneq(buf, " Whois Server:", 16)) { - for (p = buf; *p != ':'; p++); /* skip until colon */ - for (p++; *p == ' '; p++); /* skip colon and spaces */ + if (state == 1 && (strneq(buf, " Whois Server:", 16) + || strneq(buf, " WHOIS Server:", 16))) { + for (p = buf; *p != ':'; p++); /* skip until the colon */ + for (p++; *p == ' '; p++); /* skip the spaces */ referral_server = strdup(p); if ((p = strpbrk(referral_server, "\r\n "))) *p = '\0';