mrglavas 2003/07/15 14:23:47 Modified: java/src/org/apache/xerces/util URI.java Log: Added a necessary constraint not expressed by the BNF. RFC 2396 states that hostnames take the form described in RFC 1034 and RFC 1123. According to RFC 1034, hostnames are limited to 255 chars. Revision Changes Path 1.10 +12 -1 xml-xerces/java/src/org/apache/xerces/util/URI.java Index: URI.java =================================================================== RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/util/URI.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- URI.java 15 Jul 2003 20:40:06 -0000 1.9 +++ URI.java 15 Jul 2003 21:23:47 -0000 1.10 @@ -1444,6 +1444,17 @@ return isWellFormedIPv4Address(address); } else { + // hostname = *( domainlabel "." ) toplabel [ "." ] + // domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum + // toplabel = alpha | alpha *( alphanum | "-" ) alphanum + + // RFC 2396 states that hostnames take the form described in + // RFC 1034 (Section 3) and RFC 1123 (Section 2.1). According + // to RFC 1034, hostnames are limited to 255 characters. + if (addrLength > 255) { + return false; + } + // domain labels can contain alphanumerics and '-" // but must start and end with an alphanumeric char testChar;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]