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

_ClassType Cookie

HTTP Cookie.

This class represents both Netscape and RFC 2965 cookies.

This is deliberately a very simple class. It just holds attributes. It's possible to construct Cookie instances that don't comply with the cookie standards. CookieJar.make_cookies is the factory function for Cookie objects -- it deals with cookie parsing, supplying defaults, and normalising to the representation used in this class. CookiePolicy is responsible for checking them to see whether they should be accepted from and returned to the server.

Note that the port may be present in the headers, but unspecified ("Port" rather than"Port=80", for example); if this is the case, port is None.

Instance Methods [hide private]
__init__(self, version, name, value, port, port_specified, domain, domain_specified, domain_initial_dot, path, path_specified, secure, expires, discard, comment, comment_url, rest, rfc2109=False)
has_nonstandard_attr(self, name)
get_nonstandard_attr(self, name, default=None)
set_nonstandard_attr(self, name, value)
is_expired(self, now=None)