Hi there. In CPv3r2, I get a 500 HTTP error when I call this
delete
cookie function.
Here is the entire code set, right from the example:
class CookieTest:
def __init__(self):
pass
def index(self):
pass
def setCookie(self):
cookie = cherrypy.response.cookie
cookie['cookieName'] = 'cookieValue'
cookie['cookieName']['path'] = '/'
cookie['cookieName']['max-age'] = 3600
cookie['cookieName']['version'] = 1
return "<html><body>Hello, I just
sent you a
cookie</body></html>"
setCookie.exposed = True
def readCookie(self):
cookie = cherrypy.request.cookie
res = """<html><body>Hi,
you sent me %s cookies.<br />
Here is a list of cookie names/values:<br
/>""" %
len(cookie)
for name in cookie.keys():
res += "name: %s, value: %s<br>"
% (name,
cookie[name].value)
return res + "</body></html>"
readCookie.exposed = True
def delCookie(self):
cookie =
cherrypy.response.cookie['cookieName']['expires'] = 0
delCookie.exposed = True
Did some of this syntax change for 3.0? Or is this a bug?
Thank you in advace,
Gloria
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|