[Zope] redirect strangeness ...

Oliver Bleutgen myzope@gmx.net
Tue, 27 Aug 2002 18:16:05 +0200


Dennis Allison wrote:

> I would have thought that Zope would have intercepted the redirect
> and processed it locally it it could (why do a server-client-server
> transaction if you don't have to).  

No, zope doesn't do this. And it would be very wrong if it did.
If you want to "process it locally", just don't send a redirect, call 
the method you want to send yourself on the server, instead of calling a 
RESPONSE.redirect().


> Even if there were a browser transaction, 

Believe me, it is. Did you try tcpwatch?

> wouldn't the browser simply note that the URL is
> local and make a request using the current base.   Zope then would 
> have to sort out the proper target URL.

Most browser do it, but it is not guaranted to work by the standard. I 
already told how I was bitten by a similar problem.

> 
> The fact that it works most of the time seems to support this view
> although I have not looked in detail at the code nor at the behavior 
> of the various browsers.

I'm quite sure it works with most (all) modern browsers, but tacking the 
absolute_url to the redirect location doesn't hurt and is rfc-conform. 
So why not do it?


cheers,
oliver