Hi, I am having problems trying to set a cookie when the cookie is a pickled object. It appears to be a problem when the string representation of the pickled object containes carrage returns. ...setCookie seems to barf in this situation. Anyone else had problems with this and/or found work arounds? PS I am using zope 2.1.3 from src. terry -- Terry Kerr (terry@adroit.net) Adroit Internet Solutions (www.adroitnet.com.au) (03) 9888 8522 0414 938 124
On Mon, 31 Jan 2000, Terry Kerr wrote:
Hi,
I am having problems trying to set a cookie when the cookie is a pickled object. It appears to be a problem when the string representation of the pickled object containes carrage returns. ...setCookie seems to barf in this situation. Anyone else had problems with this and/or found work arounds?
PS I am using zope 2.1.3 from src.
from base64 import decodestring, encodestring cookie = encodestring(pickledstuff) And to reverse pickledstuff = decodestring(cookie) -- ___ // Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au // E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen
participants (2)
-
Stuart 'Zen' Bishop -
Terry Kerr