Module cookielib :: Class CookiePolicy
[hide private]
[frames] | no frames]

_ClassType CookiePolicy

Known Subclasses:

Defines which cookies get accepted from and returned to server.

May also modify cookies, though this is probably a bad idea.

The subclass DefaultCookiePolicy defines the standard rules for Netscape and RFC 2965 cookies -- override that if you want a customised policy.

Instance Methods [hide private]
 
set_ok(self, cookie, request)
Return true if (and only if) cookie should be accepted from server.
 
return_ok(self, cookie, request)
Return true if (and only if) cookie should be returned to server.
 
domain_return_ok(self, domain, request)
Return false if cookies should not be returned, given cookie domain.
 
path_return_ok(self, path, request)
Return false if cookies should not be returned, given cookie path.
Method Details [hide private]

set_ok(self, cookie, request)

 

Return true if (and only if) cookie should be accepted from server.

Currently, pre-expired cookies never get this far -- the CookieJar class deletes such cookies itself.