Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > RFC 2965 cookies, cookielib, and mailman.

Thread Tools

RFC 2965 cookies, cookielib, and mailman.

C. Titus Brown
Posts: n/a
Hi all,

just spent some time playing with cookielib in Python 2.4, trying
to get the cookielib example [0] to work with my mailman admindb page.
The problem was that cookies weren't getting saved.

The issue turned out to be that mailman sends out RFC 2965 [1] cookies,
which are by default rejected by cookielib. I don't remotely pretend to
understand the issues involved; hence my post .

A few questions for those more clued in than me:

* what is the difference between RFC 2965 cookies and others?

* why would mailman implement RFC 2965 cookies over the old format?
(I'm guessing simply because it's the latest/best/format?)

* why would cookielib NOT accept RFC 2965 cookies by default?

* my reference "good" implementation that worked with the
urllib2/cookielib is Quixote, which seems to send out
cookies in the older (Netscape?) style. Should this
be changed or updated in Quixote?

The obvious google searches found an awful lot of information but
nothing obviously pertinent.

In any case, the way to make the cookielib example work for mailman is
like so:

policy = cookielib.DefaultCookiePolicy(rfc2965=True)
cj = cookielib.LWPCookieJar('cookies.lwp', policy=policy)


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
an XML-based format with semantics like RFC 5322 (RFC 822)? Ivan Shmakov XML 3 02-13-2012 04:26 PM
Cookies and RFC 2109 mauro ASP .Net 5 07-19-2005 12:30 AM
Re: RFC 2965 cookies, cookielib, and mailman. Titus Brown Python 0 02-13-2005 08:49 PM
RFC 2965 cookies, cookielib, and mailman. John J Lee Python 0 01-30-2005 10:19 PM
RFC's and acronyms G. Orme MCSE 8 01-19-2004 04:51 PM