Package: whois
Version: 4.7.20
Severity: normal
Tags: patch
The attached patch adds support for HTTP GET to whois. The idea is that
several of the existing 'WEB' suffixes which cause whois to print out:
'This TLD has no whois server, but you can access the whois database at'
could be converted to GET requests. That way the user at least gets
some data back immediately.
The new format of the tld_serv_list entry is:
.domain.suffix GET http://rwhois.server/cgi-bin/whois.cgi?domain=
The domain being queried is automatically suffixed to the end of this
line.
The patch doesn't silence the warning about using RIPE flags, but that's
a minor glitch (and is more work to fix that is really required)
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (700, 'testing'), (600, 'unstable'), (550, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.17-2-686 (SMP w/1 CPU core)
Locale: LANG=en_ZA, LC_CTYPE=en_ZA (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages whois depends on:
ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries
ii libidn11 0.6.5-1 GNU libidn library, implementation
whois recommends no packages.
-- no debconf information
diff -ru2 whois-4.7.20.a/make_tld_serv.pl whois-4.7.20.b/make_tld_serv.pl
--- whois-4.7.20.a/make_tld_serv.pl 2003-05-05 18:12:41.000000000 +0200
+++ whois-4.7.20.b/make_tld_serv.pl 2007-05-12 20:05:47.000000000 +0200
@@ -15,4 +15,5 @@
$b = "\\x04" if $b eq 'CRSNIC';
$b = "\\x07" if $b eq 'PIR';
+ $b =~ s/^G(?:ET)?\s+http:\/\/([^\/]+)/\\x08$1\\x0GET /;
$b = "\\x09" if $b eq 'NICCC';
print " \"$a\",\t\"$b\",\n";
diff -ru2 whois-4.7.20.a/tld_serv_list whois-4.7.20.b/tld_serv_list
--- whois-4.7.20.a/tld_serv_list 2007-05-12 20:21:54.000000000 +0200
+++ whois-4.7.20.b/tld_serv_list 2007-05-12 20:18:52.000000000 +0200
@@ -303,5 +303,5 @@
.yu NONE # www.nic.yu
.ac.za whois.ac.za
-.co.za WEB http://whois.co.za/
+.co.za GET http://whois.co.za/cgi-bin/whois.sh?Domain=
.gov.za whois.gov.za
#.net.za whois.net.za
diff -ru2 whois-4.7.20.a/whois.c whois-4.7.20.b/whois.c
--- whois-4.7.20.a/whois.c 2006-11-24 10:33:53.000000000 +0200
+++ whois-4.7.20.b/whois.c 2007-05-12 20:06:32.000000000 +0200
@@ -211,4 +211,9 @@
puts(server + 1);
return NULL;
+ case 8:
+ server = server + 1;
+ fstring = strdup(hserver + strlen(server) + 2);
+ port = "80";
+ break;
case 2:
puts(server + 1);