[Zope] Q: Howto add Last-modified to the header?
Daryl Tester
dt@picknowl.com.au
Mon, 15 May 2000 08:13:25 +0930
Christian Leutloff wrote:
> This line seams to work:
> <dtml-call "RESPONSE.setHeader('Last-Modified', '2000/05/14 13:15:45.0533 GMT+1')">
Actually, that doesn't look like a valid date format for HTTP headers
(refer to RFC 2616 for details). It should look something more like
"Sat, 13 May 2000 22:37:47 GMT" (with no offset on GMT).
> The following line isnīt working
> <dtml-call "RESPONSE.setHeader('Last-Modified', '<dtml-var
> bobobase_modification_time>')">
Whenever you are within double quotes, you are using a Python
expression, so <dtml-*> will no longer work. Also, using ''
is a string literal, so you would have literally been setting
Last-Modified to "<dtml-var bobobase_modification_time>". Try
something like:
<dtml-call "RESPONSE.setHeader('Last-Modified', _['bobobase_modification_time'])>
Regards,
Daryl Tester