[Zope-dev] Re: rfc1123

Martijn Pieters mj@antraciet.nl
Mon, 22 Nov 1999 20:00:08 +0100


[Moved to Zope-Dev]

At 17:47 22-11-99 , rgines@purina.com wrote:
>I have been getting an rfc1123 error on the site that I have been
>developing on for about a week now.  I will get this error off of my main
>page   (ie www.sitename.com:8080/).   If I go to the manage resource, I am
>authenticated through a id/pw screen and from then on all is well.   I have
>tried to debug myself but to no avail.
>
>If someone can suggest the error of my ways I would appreciate it.

You are trying to call a non-existent method. At least not in that context. 
I think the following will do what you trying to accomplish:

   <dtml-call "RESPONSE.setHeader('expires', (ZopeTime() + .01).rfc822())">

This does the following:

1. ZopeTime() + .01 returns a DateTime object 36 minutes in the future

2. rfc822() is called on this resulting DateTime, which is a date and time 
string that also confirms to the RFC1123 standard. DateTime objects don't 
(yet) support an rfc1123 method.

3. A header, expires, is set with this string ad a value on the RESPONSE 
object.

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| T: +31 35 7502100 F: +31 35 7502111
| mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
---------------------------------------------