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

Commits on Feb 4, 2016

  1. 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 committed Feb 4, 2016
    2
    Copy the full SHA
    335205c View commit details
    Browse the repository at this point in the history