[Zope] Modifying RESPONSE on External Method

Dieter Maurer dieter@handshake.de
Fri, 15 Jun 2001 23:24:06 +0200 (CEST)


oivvio polite writes:
 >    <dtml-call "RESPONSE.setHeader('Last-Modified', bobobase_modification_time().toZone('GMT').rfc822())">
 > 
 > works great for dtml methods and documents. But how do I tell the client to 
 > cache the results of an external method?
In the same way.

It is just a bit different how you get hold of "RESPONSE".
Your options:

  1.  you pass RESPONSE as a parameter to the External Method

  2.  you get REQUEST (somehow) and use "REQUEST.RESPONSE"

Your options to get at REQUEST:

  1.  you pass REQUEST as parameter

  2.  you have the first parameter "self"
      and have satisfied the conditions for the
      External Method calling magic (==> searchable mailing list archive)
      or pass a Zope object explicitly as parameter "self".
      Then you can use "self.REQUEST" to access "REQUEST".


Dieter