1
0
mirror of https://github.com/golang/go synced 2024-11-25 09:17:57 -07:00

net: allow _ in names

Enables lookup of _jabber._tcp.gmail.com's SRV record.

Fixes #1167.

R=r, r2
CC=golang-dev
https://golang.org/cl/2353043
This commit is contained in:
Russ Cox 2010-10-07 06:45:50 -04:00
parent 7eb13b95a3
commit 2408a4bbbd

View File

@ -207,7 +207,7 @@ func isDomainName(s string) bool {
switch {
default:
return false
case 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z':
case 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || c == '_':
ok = true
case '0' <= c && c <= '9':
// fine