tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: More on redirection problems
Date Fri, 10 Nov 2000 01:58:34 GMT
Nacho wrote:

> Hola a todos:
> After some more research in the issues related to NATs and tomcat
> standalone, and more reading, i think i have found a real and common
> problem in tomcat 3.X, that it's not present in Tomcat 4.0 ( this is
> from a brief reading of the code ).
> The problem, i think i'd found, is that when tomcat does a redirection
> do not use the "host" header received, he tries to recontruct host+port
> info based on his own port and the name (or ip ) found  in the Host
> header of the request, that IMHO is bad because the real uri (host+port)
> is dictated by the Host header..
> But in addition i'd found that the relevant RFC for tomcat3 ( that is a
> HTTP 1.0 server AFAIK ) dont say anything about Host headers or
> something similar at all.
> I have prepared a simple patch for tomcat 3.2 and 3.x about this.

What Tomcat 4.0 does is sets the value that is returned by
request.getServerName() -- and this is the value used to construct
URLs on a redirect -- from the value of the "Host" header.  If your
does this to Tomcat 3.2, I'm +1 for it.

> Any comments?
> Saludos ,
> Ignacio J. Ortega


> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message