tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Vernet <aver...@scdi.org>
Subject Re: request.getServerPort() returns wrong port when using tcpmon
Date Fri, 02 Feb 2007 00:15:54 GMT


Alessandro Vernet wrote:
> 
> When the request I send to Tomcat go through tcpmon, calls to
> httpServletRequest.getServerPort() in my code always return 80. This is
> incorrect, as Tomcat is listening in fact to port 8080. I don't have this
> problem when request don't do through tcpmon.
> 

I found the reason for this behavior. It is quite simple actually: I am
using Axis tcpmon packaged as a plug-in for IntelliJ
(http://www.intellij.org/twiki/bin/view/Main/TcpMonitor), and that version
of tcpmon always sends Host: localhost, instead of Host: localhost:8080 when
it forwards the request to port 8080.

Other versions of tcpmon (like this one: https://tcpmon.dev.java.net/) send
a Host header with a correct port. So it just looks like a bug in that
IntelliJ's plug-in.

Alex
-- 
Orbeon Forms - Web Forms for the Enterprise, Done the Right Way
http://www.orbeon.com/

-- 
View this message in context: http://www.nabble.com/request.getServerPort%28%29-returns-wrong-port-when-using-tcpmon-tf3150713.html#a8759563
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message