473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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)

thanks,
--titus

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John J Lee | last post by:
Just noticed your c.l.py post quoted below. Nobody but me knows or cares about this obscure stuff ;-) so I'm not surprised you got no answer... C. Titus Brown Dec 27 2004, 12:41 pm wrote: >...
2
by: john.lehmann | last post by:
Attacked is a piece of code which first hits the login page successfully and receives back login cookies. But then when I attempt to hit a page which is restricted to logged in users only, I fail....
4
by: Vlad Dogaru | last post by:
Hello, I am trying to use cookies and Python to create a simple login example. But I am very disoriented at the existence of two cookie libraries, namely Cookie and cookielib. I have seen...
1
by: onceuponapriori | last post by:
Greetings gents. I'm a Railser working on a django app that needs to do some scraping to gather its data. I need to programatically access a site that requires a username and password. Once I...
3
by: Adrian Petrescu | last post by:
Hi, all. I'm writing an app for OS X; therefore I'd prefer to use only the default python install that comes with Tiger. For the moment, however, this means: NaviOSX:~ adrianpetrescu$ python -V...
2
by: Gilles Ganault | last post by:
Hello I need to write a script to automate fetching data from a web site: 1. using the POST method, log on, with login/password saved as cookies 2. download page and extract relevent information...
2
by: Joshua Kugler | last post by:
Standard disclaimer: read, googled, read some more. If you have a link, please free free to point me there. I'm using HTTPlib to construct some functional tests for a web app we're writing. ...
2
by: Larry Bates | last post by:
I'm struggling with a project using mechanize and cookies to screen scape a website. The site requires a client created cookie for authentication. Below is the code I'm attempting to use with the...
3
by: trihaitran | last post by:
Hi I am trying to pull some data from a Web site: http://schoolfinder.com The issue is that I want to use the advanced search feature which requires logging into the Web site. I have a username...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.