tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Casey Haakenson" <>
Subject sendRedirect and absolute paths
Date Thu, 16 Feb 2006 23:24:52 GMT
We have a customer who is hitting our web GUI through a fairly
complicated SSH proxy scheme.  For example, when they hit a page on our
site such as /redirect.jsp we do a
response.sendRedirect("/newpage.jsp").  This results in a 302 status
code and a Location header with the full URI
( which is the incorrect URL since the
proxy has been rewriting the URL's so far and this new one is the one
that the proxy is hitting not the original one the browser thinks it's


Anyway, I have tested a change to CoyoteResponse.sendRedirect:1114 (we
are using 4.1.24) to send the "relative absolute" ("/newpage.jsp") path
back to the browser in the Location header.  This appears to solve the
problem and work in all browsers I've been able to test, but am worried
that since you guys went to so much trouble making it include the
protocol, hostname, port, etc that this may break some odd browser or
case I'm not fully understanding at the moment.


Any comments on whether this is correct or totally bogus would really be




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message