tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rs...@vgalleries.com (Richard Sand)
Subject Re: Not fixed in 3.2.beta2- Bug: Tomcat setting wrong host on redirect
Date Tue, 01 Aug 2000 18:04:05 GMT
Can anyone else please confirm this bug in 3.2b2??  I'm anxious to see it
fixed in the release of 3.2.  Thaks!

-Richard

-----Original Message-----
From: Richard Sand <rsand@vgalleries.com>
To: tomcat-user@jakarta.apache.org <tomcat-user@jakarta.apache.org>
Date: Sunday, July 30, 2000 3:10 AM
Subject: Not fixed in 3.2.beta2- Bug: Tomcat setting wrong host on redirect


>I tried tomcat 3.2-beta 2, it is still putting in the machines local
>hostname into its redirects instead of the FQDN from the request.
>
>Can someone else verify that Tomcat behaves this way?
>
>Thanks!
>
>-Richard
>
>-----Original Message-----
>From: Richard Sand <rsand@vgalleries.com>
>To: tomcat-user@jakarta.apache.org <tomcat-user@jakarta.apache.org>
>Date: Sunday, July 30, 2000 12:11 AM
>Subject: Re: Bug: Tomcat setting wrong host on redirect
>
>
>>Exactly!  The FQDN should be pulled from the client's request, because the
>>webserver is unaware of what translation (name, port, etc) is going on
>>between the web server and the client.  I'll try Tomcat 3.2, hopefully it
>>will be a full release soon!
>>
>>Thanks,
>>
>>Richard
>>-----Original Message-----
>>From: Craig R. McClanahan <Craig.McClanahan@eng.sun.com>
>>To: tomcat-user@jakarta.apache.org <tomcat-user@jakarta.apache.org>
>>Date: Saturday, July 29, 2000 8:33 PM
>>Subject: Re: Bug: Tomcat setting wrong host on redirect
>>
>>
>>>
>>>
>>>Richard Sand wrote:
>>>
>>>> Hi- I've switched to another servlet engine to test and confirmed that
>>this
>>>> is a bug in Tomcat.  It should not insert the hostname into the
>redirect.
>>>
>>>Um, have you checked the 2.2 spec?  In Section 6.3, it says:
>>>
>>>    "It is legal to call this method with a relative URL path,
>>>    however the underlying container must translate the
>>>    relative path to a fully qualified URL for transmission back
>>>    to the client."
>>>
>>>>
>>>> If I browse to www.xyz.com:81/servlet/MyServlet and the servlet does a
>>>> response.sendRedirect("/nextpage.html"), the browser should go to
>>>> www.xyz.com:81/nextpage.html, not the internal hostname of the web
>>server.
>>>>
>>>> Any suggestions?  Tomcat is 3.1, web server is Apache on Solaris
>(sparc).
>>>>
>>>
>>>Upgrade to Tomcat 3.2, which grabs the hostname (and port) from the
>>original
>>>request when it creates the absolute URL of the response.
>>>
>>>>
>>>> -Richard
>>>>
>>>
>>>Craig McClanahan
>>>
>>>
>>>>
>>>> -----Original Message-----
>>>> From: Richard Sand <rsand@vgalleries.com>
>>>> To: tomcat-user@jakarta.apache.org <tomcat-user@jakarta.apache.org>
>>>> Date: Saturday, July 29, 2000 1:40 AM
>>>> Subject: Tomcat setting wrong host on redirect
>>>>
>>>> >Hi all- whenever I do a respond.sendredirect, Tomcat inserts the
actual
>>>> >hostname of the web server into the redirect, instead of the hostname
>>from
>>>> >the request or the hostname as specified in my Apache httpd.conf.  For
>>>> >example, externally, my server is known as www.xyz.com:81, whereas on
>>the
>>>> >inside it is simply known as "abc".  So on every redirect, the browser
>>is
>>>> >told to go to http://abc/mytarget which it then expands to
>>>> >www.abc.com/mytarget which is, of course, totally wrong!
>>>> >
>>>> >Is there some way to force Tomcat to put the proper host into the
>>redirect?
>>>> >Perhaps some tag in the server.xml that isn't there at the moment?
>>>> Thanks!!
>>>> >
>>>> >-Richard
>>>> >
>>>> >
>>>
>>
>


Mime
View raw message