You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Nicholas Ide <id...@nlm.nih.gov> on 2002/01/18 15:11:22 UTC

infinite redirect with tomcat 4.0.1, apache, cookies disabled

First, Kudos to the development gang.  We've been using Turbine 
while it was still called Dash.  I really like the changes that 
have been made to get to version 2.1.  Thanks!

Now my problem:

Turbine 2.1, Apache 1.3.20, Tomcat 4.0.1, (mod_webapp or mod_jk)
Cookies disabled, using virtual host and port

The turbine.java redirect logic uses DynamicURI
which in turn does an encodeURL on an absolute URL.

Unfortunately, due to some bug in the above configuration or
in the servlet spec's definition of what encodeURL should do, 
encodeURL doesn't always recognize that
an absolute URL is in fact pointing to the current servlet.
When this happens, encodeURL doesn't put in the sessionID and
we end up with the "infinite redirect" message from turbine.

(encodeURL's problem is caused by using a host and port
that are different from the "servername" and "serverport" where
tomcat is running.  VirtualHost, ProxyName, ProxyPort don't
adequately address this problem.  Load balancing software that sits 
in front of apache maps user_specified_name:user_specified_port 
to actual_name:actual_port.  We want application generated
url's to use whatever server:port the user specified--not the
server:port that happen to have serviced the request.)

I've noticed in turbine 3.x that DynamicURI has been changed
to support relative URL's, but that the default behavior is still
to generate an absolute URL.  I've also noticed that the redirect
logic has been removed.   I wonder if these steps were taken because
you guys were trying to address the above problem.

I'm nervous about upgrading to turbine 3.x since it
hasn't had an official release yet.  And, unless there is NO use of
absolute URL's, I don't think upgrading to 3.x will solve my problem.

Ideas?


-Nick Ide


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: infinite redirect with tomcat 4.0.1, apache, cookies disabled

Posted by Rodney Schneider <rl...@arcalink.com>.
Hi Nick!

Please see this post for a patch to fix this problem:

<http://www.mail-archive.com/turbine-dev@jakarta.apache.org/msg03660.html>

> I've noticed in turbine 3.x that DynamicURI has been changed
> to support relative URL's, but that the default behavior is still
> to generate an absolute URL.  I've also noticed that the redirect
> logic has been removed.   I wonder if these steps were taken because
> you guys were trying to address the above problem.

The redirect logic should have been removed from Turbine 2.x a long time 
ago...  I am not really sure why no-one has commited this patch yet, I have 
been using a patched version of Turbine for development purposes without a 
hiccup.

Regards,

-- Rodney

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>