470,870 Members | 1,822 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,870 developers. It's quick & easy.

RFC 2965 cookies, cookielib, and mailman.

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)


[0] http://aspn.activestate.com/ASPN/Coo.../Recipe/302930
[1] http://www.faqs.org/rfcs/rfc2965.html
Jul 18 '05 #1
0 1609

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by John J Lee | last post: by
2 posts views Thread by john.lehmann | last post: by
4 posts views Thread by Vlad Dogaru | last post: by
1 post views Thread by onceuponapriori | last post: by
3 posts views Thread by Adrian Petrescu | last post: by
2 posts views Thread by Gilles Ganault | last post: by
2 posts views Thread by Joshua Kugler | last post: by
2 posts views Thread by Larry Bates | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.