473,325 Members | 2,860 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,325 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 1755

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
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.