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

Preserve the host name of address when parsing /etc/hosts file #4837

Closed
wants to merge 1 commit into from

Conversation

@trustin
Copy link
Member

commented Feb 4, 2016

Motivation:

When an InetNameResolver resolves a name, it is expected to reserve the
requested host name in the resolved InetAddress.

DefaultHostsFileEntriesResolver does not preserve the host name. For
example, resolving 'localhost' will return an InetAddress whose address
is '127.0.0.1', but its getHostString() will not return 'localhost' but
just '127.0.0.1'.

Modifications:

Fix the construction of parsed InetAddresses in HostsFileParser

Result:

Host name is preserved in the resolved InetAddress

Preserve the host name of address when parsing /etc/hosts file
Motivation:

When an InetNameResolver resolves a name, it is expected to reserve the
requested host name in the resolved InetAddress.

DefaultHostsFileEntriesResolver does not preserve the host name. For
example, resolving 'localhost' will return an InetAddress whose address
is '127.0.0.1', but its getHostString() will not return 'localhost' but
just '127.0.0.1'.

Modifications:

Fix the construction of parsed InetAddresses in HostsFileParser

Result:

Host name is preserved in the resolved InetAddress

@trustin trustin added the defect label Feb 4, 2016

@trustin trustin added this to the 4.1.0.CR2 milestone Feb 4, 2016

@trustin

This comment has been minimized.

Copy link
Member Author

commented Feb 4, 2016

@netkins

This comment has been minimized.

Copy link

commented on 335205c Feb 4, 2016

TeamCity pull requests :: netty Build 1212 is now running

This comment has been minimized.

Copy link

replied Feb 4, 2016

TeamCity pull requests :: netty Build 1212 outcome was SUCCESS
Summary: Tests passed: 6409, ignored: 23 Build time: 00:43:10

@slandelle

This comment has been minimized.

Copy link
Contributor

commented Feb 4, 2016

lgtm

@normanmaurer

This comment has been minimized.

Copy link
Member

commented Feb 4, 2016

Cherry-picked into 4.1 as ef0e053

@normanmaurer normanmaurer deleted the host_file_resolver_fix branch Feb 4, 2016

slandelle added a commit to AsyncHttpClient/async-http-client that referenced this pull request Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.