All numeric is OK too nowadays

This commit is contained in:
Miek Gieben 2012-02-13 17:58:43 +01:00
parent c9da0472de
commit 6470b8335d
1 changed files with 2 additions and 2 deletions

View File

@ -221,7 +221,7 @@ func IsDomainName(s string) (uint8, uint8, bool) { // copied from net package.
}
last := byte('.')
ok := false // ok once we've seen a letter
ok := false // ok once we've seen a letter or digit
partlen := 0
labels := uint8(0)
for i := 0; i < l; i++ {
@ -235,7 +235,7 @@ func IsDomainName(s string) (uint8, uint8, bool) { // copied from net package.
case c == '\\':
// Ok
case '0' <= c && c <= '9':
// fine
ok = true
partlen++
case c == '-':
// byte before dash cannot be dot