if suffixes don't work, check for name directly.
also fixes short names like bit.ly when ndots>1.
tested by tossing domain and search lines from /etc/resolv.conf
Fixes #2.
R=agl, agl1
CC=golang-dev
https://golang.org/cl/152048
return;
}
}
+
+ // Last ditch effort: try unsuffixed.
+ rname := name;
+ if !rooted {
+ rname += "."
+ }
+ addrs, err = tryOneName(cfg, rname);
+ if err == nil {
+ cname = rname;
+ return;
+ }
return;
}
},
DialErrorTest{
"tcp", "", "no-such-name:80",
- `dial tcp no-such-name:80: lookup no-such-name\..*\.( on .*)?: no (.*)`,
+ `dial tcp no-such-name:80: lookup no-such-name\.(.*\.)?( on .*)?: no (.*)`,
},
DialErrorTest{
"tcp", "", "mh/astro/r70:http",