Hi Tobias,
Should I:
....
h = re.compile('^Set-Cookie: ').sub('', cookie.output(), count=1)
self.response.headers.add_header('Set-Cookie', str(h))
self.response.out.write(htmlcode)
I try, but seems doesn't works.
Allen
On Oct 4, 7:34 am, Tobias <[email protected]> wrote:
> Hi Allen,
>
> On Oct 3, 12:28 pm, Allen <[email protected]> wrote:
>
> > I try as follow to create a Cookie.
>
> > NEW_SID = sha.new(repr(time.time())).hexdigest()
> > cookie = Cookie.SimpleCookie()
> > cookie['sid'] = NEW_SID
> > cookie['sid']['expires'] = 24*60*60
>
> h = re.compile('^Set-Cookie: ').sub('', cookie.output(), count=1)
> self.response.headers.add_header('Set-Cookie', str(h))
>
> Hope it helps,
> Tobias
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---