Navigation Menu

Skip to content

Commit

Permalink
http: avoid dns reverse lookup on HttpProtocolInfo#toString()
Browse files Browse the repository at this point in the history
Motivation:

 - billing performance depends on DNS server
 - not secure.

Modification:
 use Inetaddress#getHostAddress() instead of Inetaddress#getHostName()

Result:
no extra dns lookups.
billing file will contain ip address

Acked-by:
Target: master, 2.15, 2.14, 2.13
Require-book: no
Require-notes: yes
  • Loading branch information
kofemann committed Apr 6, 2016
1 parent 64ae699 commit 72a9d68
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -146,7 +146,7 @@ public String toString()
{
StringBuilder sb = new StringBuilder() ;
sb.append(getVersionString()) ;
sb.append(':').append(_clientSocketAddress.getAddress().getHostName());
sb.append(':').append(_clientSocketAddress.getAddress().getHostAddress());
sb.append(':').append(_clientSocketAddress.getPort()) ;
sb.append(':').append(httpDoorCellName);
sb.append(':').append(httpDoorDomainName);
Expand Down

0 comments on commit 72a9d68

Please sign in to comment.