[mod_python] Chewing cookies

matt matt at proweb.co.uk
Tue Jul 23 11:45:56 EST 2002

Hi, presumably you wanted it to go to the list to so I've included your mail
below in full too

Rather than work out the answres to your questions directly I think it might
be better for you to go read the theory and practice of cookies

The official spec
(which is curiously marked as "Preliminary Specification - Use with

working with cookies :

settign the expiry to a past date will delete them

> Hi Matt,
> Thanks for the reply. (I must say, it's hard not to totally love python.)
> To recap, all cookies are sent by the client in a single header ('Cookie')
> semi-colon separated.
> So here's a couple of follow-up questions:
> * Any rules for the date format? Is something like
> 'expires=Wed, 03-Jul-2002 05:18:07 GMT; ' OK?
> * what's the procedure to get rid of a cookie?
> Netscape docs (or Mozilla, I forgot which one) seem to suggest that the
> doesn't get rid of the cookie. But I saw in some Zope code snipplet
> I forgot which module, maybe somewhere in ZPublisher/HTTPResponse), that
> the way Zope dumped old cookies was to send them with a passed date
> ('expires=1971' or something).
> Some related data on this topic I found of interest:
> * sending a cookie path ('path=/; ') is Mandatory,
> else Netscape|Lynx won't store the cookie (Explorer?);
> * domain must contain 2 dots minimum, like in 'domain=.foo.com;' (this
> found in Zope sources, but not yet tested on my own). Could someone
> Cheers, Vio

More information about the Mod_python mailing list