[Zope] SQLSession and RESPONSE.redirect

Ron Bickers rbickers@logicetc.com
Thu, 22 Feb 2001 23:57:25 -0500


This is by design.  Just because you call a function that tells your browser
to make another request, doesn't mean execution will stop, even if it
"seems" like it should.

>From the Advanced DTML chapter:

"Another upshot of using the return tag is that DTML execution will stop
after the return tag."

Try adding <dtml-return> after the redirect and you should get what you
expect.

_______________________

Ron Bickers
Logic Etc, Inc.
rbickers@logicetc.com

> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Andrew Williams
> Sent: Thursday, February 22, 2001 6:28 PM
> To: zope@zope.org
> Subject: [Zope] SQLSession and RESPONSE.redirect

> Check this out...  everything works as figured, *except*
> AFTER the response.redirect, the code:
>   <dtml-if "SESSION.has_key('test')>
>     <dtml-call "SESSION.delete('test')>
>   </dtml-if>
> runs, effectively deleting test from the database after the
> RESPONSE.redirect.
>
> I've checked, double, and triple checked... I know this is
> happening, b/c if I remove the session.delete code 'test'
> is in the db.
>
> Am I crazy, or is this by design?