aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-10-07 06:45:50 -0400
committerRuss Cox <rsc@golang.org>2010-10-07 06:45:50 -0400
commit2408a4bbbd8db78c890b9911868fb4face7558d7 (patch)
tree33054d4ed558f6d8412812e8d6444613756c2075
parent7eb13b95a39300b50c02dde0cf32c76d992dcab7 (diff)
downloadgo-2408a4bbbd8db78c890b9911868fb4face7558d7.tar.gz
go-2408a4bbbd8db78c890b9911868fb4face7558d7.zip
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
-rw-r--r--src/pkg/net/dnsclient.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/net/dnsclient.go b/src/pkg/net/dnsclient.go
index 0343dd2f0a..16103c4d05 100644
--- a/src/pkg/net/dnsclient.go
+++ b/src/pkg/net/dnsclient.go
@@ -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