Sorry for the third posting, the previous diff was not a diff -u. If I
don't get this
posting right I'll slink away silently in the shame I will so rightfully
deserve. Here is
the diff -u of the changes to Turbine.java to get around the infinite
redirect.
Index: Turbine.java
===================================================================
RCS file:
/products/cvs/turbine/turbine/src/java/org/apache/turbine/Turbine.java,v
retrieving revision 1.28
diff -u -r1.28 Turbine.java
--- Turbine.java 2000/12/20 21:53:12 1.28
+++ Turbine.java 2000/12/21 11:01:20
@@ -175,6 +175,11 @@
private boolean firstDoGet = true;
/**
+ * Track new sessionIds to prevent infinite redirect
+ */
+ private TreeSet newSessions = new TreeSet();
+
+ /**
* This init method will load the default resources from a
* properties file.
*
@@ -317,11 +322,12 @@
// add a dummy bit of path info to fool browser into
thinking
// this is a new URL
- if (data.getParameters().getString("redirected") == null)
+ if (!newSessions.contains(data.getSession().getId()))
{
+ newSessions.add(data.getSession().getId());
duri.addPathInfo("redirected", "true");
- }
- // if the redirected param was already there then we've
been
+ }
+ // if the sessionId is already in newSessions then we've
been
// round this once already :-(
else
{
@@ -335,6 +341,7 @@
return;
}
+ newSessions.remove(data.getSession().getId());
// Fill in the screen and action variables.
data.setScreen ( data.getParameters().getString("screen") );
data.setAction ( data.getParameters().getString("action") );
-----Original Message-----
From: Magnus ?or Torfason [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 20, 2000 1:13 PM
To: Turbine
Subject: Infinite redirect detected
Here is my problem. I realize that this most likely
stems from some IE stupidity, but is very annoying nevertheless.
My webapp is contained in a frame, and I have resolved the
events that lead to this error
The frame is bookmarked.
The browser is closed and reopened.
The bookmark is selected.
On this first hit, the server detects an infinite redirect,
and throws a stacktrace in the face of the user.
This does NOT happen if the servlet is bookmarked directly, which
is why I strongly suspect a browser bug.
This is annoying because I can't really say to my users
that my webapp must not be contained in a frame, that it cannot
be bookmarked, or that it is not viewable with IE 5.
Any thoughts?
...
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]