You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/01/06 22:59:36 UTC

DO NOT REPLY [Bug 5709] New: - HttpServletRequest.getHost only returns IP address of server

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5709>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5709

HttpServletRequest.getHost only returns IP address of server

           Summary: HttpServletRequest.getHost only returns IP address of
                    server
           Product: Tomcat 4
           Version: 4.0.2 Beta 1
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: AJP Connector
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: rasand@attglobal.net


Hi all- I have Tomcat 4.01 and 4.02b1 with Apache 1.3.22 communicating with 
AJP13. I've got this setup on both Linux x86 and Win2000.  I have implemented a 
filter to log inbound requests, but whenever I call request.getHost(), all I 
get back is the IP addess of the server, instead of the host of the request 
originator with 4.0.1. I suspect that it is taking that IP address of the 
Apache server. With 4.0.2b1, it returned null! 

I know also that there is a bug report open about that getHost returns the IP 
address instead of resolving the hostname, and what I read is that this should 
be fixed in 4.0.2-b1, but when I tried this version, getHost returned null!

Thanks!

-Richard

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>