On Feb 7, 1:06 pm, rodmc <[EMAIL PROTECTED]> wrote:
> On Feb 6, 8:00 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
>
>
>
> > En Wed, 06 Feb 2008 15:27:53 -0200, rodmc <[EMAIL PROTECTED]>
> > escribi�:
>
> > > Hi, I am trying to set a cookie on a client computer using the Cookie
> > > module however all I get is the text being printed in the browser
> > > window. Can anyone point me in the right direction so that the cookie
>
> > > def writetocookie(number):
> > >     #writes the ID of the database entry to a cookie
> > >     cookie["dataid"]=number
> > >     print "Content-Type: text/html"
> > >     print
> > >     print "Set-Cookie: dataid=",cookie["dataid"].value
>
> > > I presume this is not the correct way to write a cookie, the examples
> > > I have found online don't seem to provide much more information.
>
> > I don't know either if this is the right way, but surely the Set-Cookie
> > header must appear *before* the blank line; that blank line separates the
> > headers from the response body.
>
> > --
> > Gabriel Genellina
>
> Thanks, that seemed to work.
>
> rod

Also how do I find out if a cookie has expired? I have tried various
methods but to no avail?

Cheers,

rod
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to