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
Closed

net: case conversion for hostname in local database #13359

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

Comments

@mikioh
Copy link
Contributor

mikioh 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
Copy link
Contributor

Why?

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

@mikioh
Copy link
Contributor Author

mikioh 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
Copy link
Contributor

rakyll 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
Copy link
Contributor Author

mikioh commented Nov 24, 2015

See golang.org/cl/17210.

@gopherbot
Copy link

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

@mikioh mikioh closed this as completed 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.
Projects
None yet
Development

No branches or pull requests

4 participants