Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: case conversion for hostname in local database #13359

Closed
mikioh opened this issue Nov 22, 2015 · 5 comments

Comments

Projects
None yet
4 participants
@mikioh
Copy link
Contributor

commented Nov 22, 2015

The commit d96a3a2 makes hostname entries in local database lowercase forcibly during go1.6 development. I don't think it's a good idea because /etc/hosts-like local database is a last resort for name resolution and https://tools.ietf.org/html/rfc4343 never says that "don't preserve case on input and output" for some reasons; perhaps it was for internetworking with old-plain systems and it is just for future use.

I don't see any rationale for the change in d96a3a2, so can you please restore the behavior that preserves case on input and output?

Note that we know a few name resolver libraries don't preserve case of hostnames and DNS labels, for example libc for OS X/iOS that supports both unicast and multicast DNS, but I still don't think we need to do case conversion for now especially with inconsistency that providing case-converted hostnames and case-preserved DNS labels.

@mikioh mikioh added this to the Go1.6 milestone Nov 22, 2015

@bradfitz

This comment has been minimized.

Copy link
Member

commented Nov 22, 2015

Why?

That commit fixed a bug. Are you proposing un-fixing that bug? Or fixing it a different way? How?

@mikioh

This comment has been minimized.

Copy link
Contributor Author

commented Nov 22, 2015

Why?

I think I've already described that that commit fixed a bug in a wrong way. Like handling DNS labels, we need case insensitivity comparison with preserving case on input and output, not case conversion on input and output.

@rakyll

This comment has been minimized.

Copy link
Member

commented Nov 23, 2015

Lowercased host is only preserved in the internal cache for comparison. It is not mutating anything. Could you explain the case with a snippet where it breaks things? I guess I am missing something.

@mikioh

This comment has been minimized.

Copy link
Contributor Author

commented Nov 24, 2015

See golang.org/cl/17210.

@gopherbot

This comment has been minimized.

Copy link

commented Nov 27, 2015

CL https://golang.org/cl/17217 mentions this issue.

@mikioh mikioh closed this in 85bfa33 Nov 27, 2015

@golang golang locked and limited conversation to collaborators Nov 27, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.