Closed
Description
by bortzmeyer:
What steps will reproduce the problem? [This is actually a problem in a comment.] Which operating system are you using? Debian "squeeze" Which revision are you using? (hg identify) 0dc6198e4ff3 tip Please provide any additional information below. The source code says: func isDomainName(s string) bool { // Requirements on DNS name: // * must not be empty. // * must be alphanumeric plus - and . // * each of the dot-separated elements must begin // and end with a letter or digit. // RFC 1035 required the element to begin with a letter, // but RFC 3696 says this has been relaxed to allow digits too. // still, there must be a letter somewhere in the entire name. But this is quite misleading: 1) RFC 1035 never *required* names to be "alphanumeric plus - and ." RFC 1035, section 2.3.1 "Preferred name syntax" just says it is the *preferred* syntax. 2) RFC 2181 made very clear in section 11 "Name syntax" that domain names can be anything (for instance, the _ is quite common, I do not even mention IDN) 3) The relaxation you mention (allowing a leading digit) was in RFC 1123, section 2.1 "Host Names and Numbers" and is about *HOST* names, not *DOMAIN* names. Host names have much stricter rules.