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

           Summary: HttpServletRequest.getRemoteHost() returning invalid
                    results
           Product: Tomcat 5
           Version: 5.5.12
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Connector:Coyote
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


This issue might be related to
http://issues.apache.org/bugzilla/show_bug.cgi?id=33971

What i am seeing is that at runtime, HttpServletRequest.getRemoteHost() is
returning invalid results. That is, it sometimes returns unqualified hostnames
(instead of an ip, which is expected if it can't get a fully-qualified
hostname). Other times it returns a hostname that has absolutely nothing to do
with the IP.

Some examples I see in my logs:

86.125.53.140 maps to msnbot.msn.com
88.7.11.140 maps to msnbot.msn.com
210.111.94.102 maps to crawl-66-249-66-138.googlebot.com
218.190.175.145 maps to msnbot.msn.com

   These are all logged by the servlet being hit, with it logging: "ip " +
request.getRemoteAddr() + " maps to " + request.getRemoteHost()

Now, if you try looking up the hostname associated with the above IPs after the
fact you will notice none of them map to the hostnames that Tomcat claims it
does. I suspect that sometimes when reverse lookup fails, Tomcat retains the
rDNS result from the previous lookup instead of returning the string format of
the IP. This might also be a new bug introduced between 5.5.9 and 5.5.12 because
I don't recall having this problem with 5.5.9.

( I'm leaving the country today for a few weeks so please excuse me if I don't
reply right away to any questions you might follow up with )

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to