[Zope] Q: Howto add Last-modified to the header?

Itamar Shtull-Trauring itamar@maxnm.com
Mon, 15 May 2000 10:48:10 +0300


Adam Karpierz wrote:
> 
> >The following line isnīt working
> ><dtml-call "RESPONSE.setHeader('Last-Modified', '<dtml-var bobobase_modification_time>')">
> >
> >How can I expand <dtml-var bobobase_modification_time> to a string,
> >that I can pass to the setHeader method call??
> 
> <dtml-call "RESPONSE.setHeader('Last-Modified', bobobase_modification_time)">
> or
> <dtml-call "RESPONSE.setHeader('Last-Modified', _.str(bobobase_modification_time))">

That's still won't work, though - it has to be in the appropiate format. 
Try this:

<dtml-call "RESPONSE.setHeader('Last-Modified',
bobobase_modification_time().toZone('GMT').rfc822())">

-- 
Itamar S.T.  itamar@maxnm.com