473,662 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Defau ltCookiePolicy( rfc2965=True)
cj = cookielib.LWPCo okieJar('cookie s.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 1801

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

Similar topics

0
505
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: > The issue turned out to be that mailman sends out RFC 2965 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...
2
2238
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. That seems to be because I am not successfully re-attaching the cookies to the header portion of the this request. I have tried 2 methods which should both work I think. The first was to use install_opener to attach the cookie handler back...
4
6447
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 examples of setting cookies (although I am still not sure about timestamps and cookie lifespan), but no reference to getting the currently set cookies. For instance, I want to see if there is any 'user' value, to check whether the user has logged in....
1
2581
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 post to the login.php page, there seems to be a redirect and it seems that the site is using a session (perhaps a cookie) to determine whether the user is logged in. So I need to log in and then have cookies and or sessions maintained as I access...
3
1679
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 Python 2.3.5 Therefore, I was not surprised to find out that cookielib did not exist here, since I knew that it was a 2.4+ feature.
2
1823
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 using regexes 3. log off 4. wait for a random number of minutes, and GOTO 1 I'm a bit confused with how to get POST and cookies in the same script:
2
3080
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. We're not using urllib2 because we need support for PUT and DELETE methods, which urllib2 does not do. We also need client-side cookie handling. So, I start reading about cookielib and run across a problem. It's cookie handling is tied quite...
2
5887
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 traceback I'm getting: 'Set-Cookie: Manageopen=cards; Domain=.domain.com; expires=Fri, 16-May-2008 14:06:00 GMT; Path=/' Traceback (most recent call last): File "<interactive input>", line 1, in <module>
3
7267
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 and password, however I want to connect programmatically from Python. I have done data capture from the Web before so the only new thing here to me is the authentication stuff. I need cookies as this page describes:...
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8856
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8762
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8545
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.