A customer complained about the error message he received when trying to
pre-register a .us domain that wasn't invalid.  It told him to 'try
something similar to "yourname.com"'.  Instead of pushing .com, the message
should probably use the original TLD.  Here is a patch:

Index: XML_Client.pm
===================================================================
RCS file: /usr/local/src/cvsroot/www/retsiger.com/lib/OpenSRS/XML_Client.pm,v
retrieving revision 1.1.1.11
diff -u -u -r1.1.1.11 XML_Client.pm
--- XML_Client.pm       20 Mar 2002 07:02:26 -0000      1.1.1.11
+++ XML_Client.pm       22 Mar 2002 06:30:27 -0000
@@ -897,7 +897,12 @@
     } elsif ($domain !~ /$OPENSRS_TLDS_REGEX$/) {
        return "Top level domain in \"$domain\" is unavailable";
     } elsif ($domain !~ 
/^[a-zA-Z0-9][.a-zA-Z0-9\-]*[a-zA-Z0-9]\.name$|^[a-zA-Z0-9][a-zA-Z0-9\-]{1,}$OPENSRS_TLDS_REGEX$/)
 {
-       return "Invalid domain format (try something similar to \"yourname.com\"";
+        my $tld = "com";
+        if ($domain =~ /$OPENSRS_TLDS_REGEX$/)
+       {
+               $tld = $1;
+       }
+       return "Invalid domain format (try something similar to \"yourname$tld\"";
     }
     return undef;
 }

Reply via email to