Cookie Module

Anand Pillai pythonguy at Hotpop.com
Mon Oct 27 01:40:32 EST 2003


It is him alright, and I maintain HarvestMan, (Capital 'H', Capital
'M').
But I dont think Nirmal is masochist, not in any way.

I dont understand why you called him "masochist". The reason why
we wrote our own cookie handling module using python's Cookie module
was that, the ClientCookie module was doing too many things, which
we wanted to avoid.

ClientCookie is exactly what it says, it is a module that acts as
a webclient apart from managing cookies. The ClientCookie module
borrows the methods of urllib2 like urlopen() and manages cookies
under the covers, so to say. Good design, no doubt but not what
we wanted.

ClientCookie is something like a wrapper over urllib2 plus cookie
handling. We wanted a module, which works *with* urllib2 and does
not wrap over it. With all due respect to CC, it cannot be modified
in a way to do that, withou writing klunky code, which I did not want.

Hence nirmal read the RFCs for cookie handling and implemented 
a module which works *along with* urllib2 rather than wrapping over
it.
The module need special calls to set the cookie which is part of
the harvestman code(in another module), so in a way it is much
inferior to client cookie, which does it transparently.

Nirmal is talking about RFCs because we want to have a very correct
technical cookie implementation for our module, no matter what web
servers
does in their wheels and geats. I know that the SetCookie2 method uses
latest cookie RFC, which almost no webserver supports, but still the
question should be taken in a spirit of technical correctness.

Yeah it has an academic quality to it, not of much pratical use maybe
right now, but I cannot understand how it makes the guy a masochist.

-Anand Pillai

jjl at pobox.com (John J. Lee) wrote in message news:<871xt3q116.fsf at pobox.com>...
> nirmalkannan at hotmail.com (N.K) writes:
> 
> >  Python's existing cookie module doesnt supports new cookie headers
> > SetCookie2 ,
> [...]
> 
> What do you want this for?  I'm curious, and I suspect you're unaware
> that the RFCs on cookies are *not* the standards followed by most of
> the web -- the real 'standards' aren't really written down anywhere.
> 
> Wait a minute (my memory works slowly), didn't I write you an email
> about this a while back?  Are you the masochist^H^H^H^H^H^H^H^H^Hguy
> who wrote some client-side cookie-handling code for a web-crawler
> (called harvestman, IIRC?)?
> 
> 
> John




More information about the Python-list mailing list