diff options
| author | Mikio Hara <mikioh.mikioh@gmail.com> | 2015-11-27 17:17:18 +0900 |
|---|---|---|
| committer | Mikio Hara <mikioh.mikioh@gmail.com> | 2015-11-27 22:52:14 +0000 |
| commit | 85bfa33fdc02417cadf46b3f185784e1cf7886b3 (patch) | |
| tree | 4064f58c7db4e5f9bd9867c6539b55cd3199ea0a /src/net/testdata | |
| parent | 98abf2937e42d560f0a8ba3c9e5bd5351c5316e6 (diff) | |
| download | go-git-85bfa33fdc02417cadf46b3f185784e1cf7886b3.tar.gz | |
net: fix case insensitivity lookup for local database such as /etc/hosts
The previous change for #12806 modified internal lookup tables and made
LookupAddr return forcibly lowercased host names by accident.
This change fixes the issue again without any behavioral change for
LookupAddr and adds missing test cases for lookupStaticHost and
lookupStaticAddr.
Updates #12806.
Fixes #13359.
Change-Id: Ifff4741cd79eb8b320b1b0f8c5e02b3a167c9fa8
Reviewed-on: https://go-review.googlesource.com/17217
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/net/testdata')
| -rw-r--r-- | src/net/testdata/case-hosts | 2 | ||||
| -rw-r--r-- | src/net/testdata/hosts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/net/testdata/case-hosts b/src/net/testdata/case-hosts new file mode 100644 index 0000000000..1f30df1179 --- /dev/null +++ b/src/net/testdata/case-hosts @@ -0,0 +1,2 @@ +127.0.0.1 PreserveMe PreserveMe.local +::1 PreserveMe PreserveMe.local diff --git a/src/net/testdata/hosts b/src/net/testdata/hosts index 4b8abb431c..b601763898 100644 --- a/src/net/testdata/hosts +++ b/src/net/testdata/hosts @@ -1,8 +1,6 @@ 255.255.255.255 broadcasthost 127.0.0.2 odin 127.0.0.3 odin # inline comment -# case insensitivity -127.0.0.4 Bor ::2 odin 127.1.1.1 thor # aliases |
