[Zope] How To Shoot Yourself In The Foot With Zope

Evan Simpson evan@4-am.com
Sat, 19 Aug 2000 11:45:12 -0400


From: "Jean Jordaan" <Jean@mosaicsoftware.com>
> In order to get more debugging info about the environment
> I'm working in, I included '<dtml-var REQUEST>' in my
> 'standard_html_footer'. This worked so nicely, I added
> '<dtml-var RESPONSE>' too, arguing that the REQUEST is
> probably only half the story. However, adding '<dtml-var
> RESPONSE>' turned out to be pretty stupid, since it caused
> some kind of recursion (the response contains the response?)
> which had Zope taking up 99% of CPU and rendering *nothing*.

Bad idea, as you discovered.  REQUEST is designed to render itself and
provide all sorts of useful information.  RESPONSE is designed to accept and
control output. Attempting to render it makes it try to return the final
page text.  I can't tell you exactly what's going on internally to make Zope
unhappy, but I *can* say "don't do that".

Cheers,

Evan @ 4-am & digicool