You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Andreas Schildbach <an...@bch-fms.de> on 2001/01/09 14:19:26 UTC

Error with request.getServerPort() and Tomcat 3.2.1, SSL (https)

Hello,

I've written a simple servlet which prints out request.getServerPort().
It is running on a Tomcat 3.2.1 (win32) configured to http on port 80 and
https on port 443.
When I try to access the servlet under http://localhost/..., it prints out
port 80.
ERROR: When I try to access the servlet via https://localhost/..., it also
prints out port 80!
Why? It should print out port 443 in my opinion.
As a result, HttpUtils.getRequestURI contructs the wrong URI
(https://localhost:80/...) when accessing via https... This can't be it?!
Or am I wrong?

Could anyone help me or provide me with a patch?

Thanks in advance!

Andreas Schildbach
financial media service