server redirect solution?

Buzzterrier
Thu, 15 Mar 2007 17:55:37 -0000

Hello,

We use a security app that sniffs incoming requests to make sure they
are still authenticated. If the user needs to be re-authenticated,
they are redirected to a login page. Upon successful authentication
they are returned to the page of the originating request.

Here is the problem, the server side redirect sends the response back
to the httpxmlrequest, where the prototype object dutifully inserts it
as html.  I tried capturing the on302, but for whatever reason this
does not get called (httpliveheaders shows a 302, but it never fires
on the browser). The cheesy hack I did was to search for some well
known text in the response, that I know is only on the login page. If
it exists I then do a window. location.reload(), which properly loads
the login page.

Does someone have a better implementation for this? I while what I did
works, it just does not feel right.

Thx.