tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38100] - HttpServletRequest.getRemoteHost() returning invalid results
Date Mon, 02 Jan 2006 18:05:43 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38100>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38100





------- Additional Comments From cowwoc@bbs.darktech.org  2006-01-02 19:05 -------
I went one step further and tried comparing the output of
HttpServletRequest.getRemoteHost() and InetAddress.getHostname():

        String remoteHost = request.getRemoteHost();
        String ip = request.getRemoteAddr();
        text.append("ip " + ip + " maps to " + remoteHost);
        String hostname = InetAddress.getByName(ip).getHostName();
        if (!hostname.equals(remoteHost))
        {
          text.append(" but the actual hostname is " + hostname);
          log.debug(text);
        }


and got output like this:

ip 210.111.94.102 maps to vz4-vlan1.networx-bg.com but the actual hostname is
210.111.94.102

doing "nslookup" locally I clearly see that 210.111.94.102 has no reverse lookup
and that vz4-vlan1.networx-bg.com actually maps to 82.147.153.200 so now I'm
100% certain this is a Tomcat bug.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message