From 2408a4bbbd8db78c890b9911868fb4face7558d7 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 7 Oct 2010 06:45:50 -0400 Subject: [PATCH] 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 --- src/pkg/net/dnsclient.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/net/dnsclient.go b/src/pkg/net/dnsclient.go index 0343dd2f0ab..16103c4d05b 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