From: Mikio Hara Date: Fri, 8 Jan 2016 18:47:40 +0000 (+0900) Subject: net: stop scanning for domain name once the first label has been found X-Git-Tag: go1.6beta2~48 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=57b1e55a0c12369522c65708c1ccf0d8630a10b4;p=gostls13.git net: stop scanning for domain name once the first label has been found Change-Id: I95c6c85eecb53ffe52b64d521180148b624e9424 Reviewed-on: https://go-review.googlesource.com/18423 Reviewed-by: Brad Fitzpatrick --- diff --git a/src/net/dnsclient.go b/src/net/dnsclient.go index 98d1750a63..5dc2a0368c 100644 --- a/src/net/dnsclient.go +++ b/src/net/dnsclient.go @@ -174,6 +174,7 @@ func absDomainName(b []byte) string { for _, x := range b { if x == '.' { hasDots = true + break } } if hasDots && b[len(b)-1] != '.' {