This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author manlioperillo
Recipients
Date 2004-06-02.09:12:36
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
>>> sys.version
'2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit
(Intel)]'
>>> sys.platform
'win32'
>>> sys.getwindowsversion()
(5, 1, 2600, 2, '')


Hi.
I don't know if this is a bug of Cookie module or of
pickle.

When I dump a Cookie instance with protocol = 2, the
data is 'corrupted'.
With protocol = 1 there are no problems.

Here is an example:

>>> s = 'Set-Cookie: key=value; path=/; expires=Fri,
21-May-2004 10:40:51 GMT'
>>> c = Cookie.BaseCookie(s)
>>> print c
Set-Cookie: key=value; expires=Fri,; Path=/;

>>> buf = pickle.dumps(c, protocol = 2)
>>> print pickle.loads(buf)
Set-Cookie: key=Set-Cookie: key=value; expires=Fri,;
Path=/;;

>>> buf = pickle.dumps(c, protocol = 1)
>>> print pickle.loads(buf)
Set-Cookie: key=value; expires=Fri,; Path=/;



Thanks and regards  Manlio Perillo
History
Date User Action Args
2007-08-23 14:22:02adminlinkissue964868 messages
2007-08-23 14:22:02admincreate