Commit 57b1e55a authored by Mikio Hara's avatar Mikio Hara

net: stop scanning for domain name once the first label has been found

Change-Id: I95c6c85eecb53ffe52b64d521180148b624e9424
Reviewed-on: https://go-review.googlesource.com/18423Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 21b4f234
......@@ -174,6 +174,7 @@ func absDomainName(b []byte) string {
for _, x := range b {
if x == '.' {
hasDots = true
break
}
}
if hasDots && b[len(b)-1] != '.' {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment