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 41263] New: - servletRequest.getRemotePort() returns incorrect value when behind mod_jk
Date Fri, 29 Dec 2006 23:41:28 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=41263>.
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=41263

           Summary: servletRequest.getRemotePort() returns incorrect value
                    when behind mod_jk
           Product: Tomcat 5
           Version: 5.5.20
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Native:JK
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: clamprecht@gmail.com


Access the following short test JSP running on a tomcat behind mod_jk and Apache:


<% out.println("Your IP is "+request.getRemoteAddr()+", your port is
"+request.getRemotePort()); %>


It returns either 0 or -1 for the remote port.  It seems to return 0 the first
time, and -1 for any subsequent request which is on the same underlying
keepalive connection.  

The desired behaviour would be that it returns the actual remote port that the
client connected from (on the client's machine), when available.  In other
words, it should behave the same as when you access the JSP through tomcat
directly through an HTTP connector (via port 8080 on a default tomcat install,
for instance).

I understand this information will not always be available, for instance, when
running behind a proxy.  But in the case of running behind mod_jk, shouldn't
this information be available, since the remote IP number is already available?

-- 
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