Back to index

python3.2  3.2.2
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
http.cookiejar.CookieJar Class Reference
Inheritance diagram for http.cookiejar.CookieJar:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def set_policy
def add_cookie_header
def make_cookies
def set_cookie_if_ok
def set_cookie
def extract_cookies
def clear
def clear_session_cookies
def clear_expired_cookies
def __iter__
def __len__
def __repr__
def __str__

Static Public Attributes

tuple non_word_re = re.compile(r"\W")
tuple quote_re = re.compile(r"([\"\\])")
tuple strict_domain_re = re.compile(r"\.?[^.]*")
tuple domain_re = re.compile(r"[^.]*")
tuple dots_re = re.compile(r"^\.+")
tuple magic_re = re.compile(r"^\#LWP-Cookies-(\d+\.\d+)", re.ASCII)

Private Member Functions

def _cookies_for_domain
def _cookies_for_request
def _cookie_attrs
def _normalized_cookie_tuples
def _cookie_from_cookie_tuple
def _cookies_from_attrs_set
def _process_rfc2109_cookies

Private Attributes

 _policy
 _cookies_lock
 _cookies
 _now

Detailed Description

Collection of HTTP cookies.

You may not need to know about this class: try
urllib.request.build_opener(HTTPCookieProcessor).open(url).

Definition at line 1206 of file cookiejar.py.


Constructor & Destructor Documentation

def http.cookiejar.CookieJar.__init__ (   self,
  policy = None 
)

Definition at line 1221 of file cookiejar.py.

01221 
01222     def __init__(self, policy=None):
01223         if policy is None:
01224             policy = DefaultCookiePolicy()
01225         self._policy = policy
01226 
01227         self._cookies_lock = _threading.RLock()
01228         self._cookies = {}

Here is the caller graph for this function:


Member Function Documentation

Definition at line 1714 of file cookiejar.py.

01714 
01715     def __iter__(self):
01716         return deepvalues(self._cookies)

Here is the call graph for this function:

Return number of contained cookies.

Definition at line 1717 of file cookiejar.py.

01717 
01718     def __len__(self):
01719         """Return number of contained cookies."""
01720         i = 0
01721         for cookie in self: i = i + 1
01722         return i

Definition at line 1723 of file cookiejar.py.

01723 
01724     def __repr__(self):
01725         r = []
01726         for cookie in self: r.append(repr(cookie))
01727         return "<%s[%s]>" % (self.__class__, ", ".join(r))

Definition at line 1728 of file cookiejar.py.

01728 
01729     def __str__(self):
01730         r = []
01731         for cookie in self: r.append(str(cookie))
01732         return "<%s[%s]>" % (self.__class__, ", ".join(r))
01733 
01734 
# derives from IOError for backwards-compatibility with Python 2.4.0
def http.cookiejar.CookieJar._cookie_attrs (   self,
  cookies 
) [private]
Return a list of cookie-attributes to be returned to server.

like ['foo="bar"; $Path="/"', ...]

The $Version attribute is also added when appropriate (currently only
once per request).

Definition at line 1257 of file cookiejar.py.

01257 
01258     def _cookie_attrs(self, cookies):
01259         """Return a list of cookie-attributes to be returned to server.
01260 
01261         like ['foo="bar"; $Path="/"', ...]
01262 
01263         The $Version attribute is also added when appropriate (currently only
01264         once per request).
01265 
01266         """
01267         # add cookies in order of most specific (ie. longest) path first
01268         cookies.sort(key=lambda a: len(a.path), reverse=True)
01269 
01270         version_set = False
01271 
01272         attrs = []
01273         for cookie in cookies:
01274             # set version of Cookie header
01275             # XXX
01276             # What should it be if multiple matching Set-Cookie headers have
01277             #  different versions themselves?
01278             # Answer: there is no answer; was supposed to be settled by
01279             #  RFC 2965 errata, but that may never appear...
01280             version = cookie.version
01281             if not version_set:
01282                 version_set = True
01283                 if version > 0:
01284                     attrs.append("$Version=%s" % version)
01285 
01286             # quote cookie value if necessary
01287             # (not for Netscape protocol, which already has any quotes
01288             #  intact, due to the poorly-specified Netscape Cookie: syntax)
01289             if ((cookie.value is not None) and
01290                 self.non_word_re.search(cookie.value) and version > 0):
01291                 value = self.quote_re.sub(r"\\\1", cookie.value)
01292             else:
01293                 value = cookie.value
01294 
01295             # add cookie-attributes to be returned in Cookie header
01296             if cookie.value is None:
01297                 attrs.append(cookie.name)
01298             else:
01299                 attrs.append("%s=%s" % (cookie.name, value))
01300             if version > 0:
01301                 if cookie.path_specified:
01302                     attrs.append('$Path="%s"' % cookie.path)
01303                 if cookie.domain.startswith("."):
01304                     domain = cookie.domain
01305                     if (not cookie.domain_initial_dot and
01306                         domain.startswith(".")):
01307                         domain = domain[1:]
01308                     attrs.append('$Domain="%s"' % domain)
01309                 if cookie.port is not None:
01310                     p = "$Port"
01311                     if cookie.port_specified:
01312                         p = p + ('="%s"' % cookie.port)
01313                     attrs.append(p)
01314 
01315         return attrs

def http.cookiejar.CookieJar._cookie_from_cookie_tuple (   self,
  tup,
  request 
) [private]

Definition at line 1446 of file cookiejar.py.

01446 
01447     def _cookie_from_cookie_tuple(self, tup, request):
01448         # standard is dict of standard cookie-attributes, rest is dict of the
01449         # rest of them
01450         name, value, standard, rest = tup
01451 
01452         domain = standard.get("domain", Absent)
01453         path = standard.get("path", Absent)
01454         port = standard.get("port", Absent)
01455         expires = standard.get("expires", Absent)
01456 
01457         # set the easy defaults
01458         version = standard.get("version", None)
01459         if version is not None:
01460             try:
01461                 version = int(version)
01462             except ValueError:
01463                 return None  # invalid version, ignore cookie
01464         secure = standard.get("secure", False)
01465         # (discard is also set if expires is Absent)
01466         discard = standard.get("discard", False)
01467         comment = standard.get("comment", None)
01468         comment_url = standard.get("commenturl", None)
01469 
01470         # set default path
01471         if path is not Absent and path != "":
01472             path_specified = True
01473             path = escape_path(path)
01474         else:
01475             path_specified = False
01476             path = request_path(request)
01477             i = path.rfind("/")
01478             if i != -1:
01479                 if version == 0:
01480                     # Netscape spec parts company from reality here
01481                     path = path[:i]
01482                 else:
01483                     path = path[:i+1]
01484             if len(path) == 0: path = "/"
01485 
01486         # set default domain
01487         domain_specified = domain is not Absent
01488         # but first we have to remember whether it starts with a dot
01489         domain_initial_dot = False
01490         if domain_specified:
01491             domain_initial_dot = bool(domain.startswith("."))
01492         if domain is Absent:
01493             req_host, erhn = eff_request_host(request)
01494             domain = erhn
01495         elif not domain.startswith("."):
01496             domain = "."+domain
01497 
01498         # set default port
01499         port_specified = False
01500         if port is not Absent:
01501             if port is None:
01502                 # Port attr present, but has no value: default to request port.
01503                 # Cookie should then only be sent back on that port.
01504                 port = request_port(request)
01505             else:
01506                 port_specified = True
01507                 port = re.sub(r"\s+", "", port)
01508         else:
01509             # No port attr present.  Cookie can be sent back on any port.
01510             port = None
01511 
01512         # set default expires and discard
01513         if expires is Absent:
01514             expires = None
01515             discard = True
01516         elif expires <= self._now:
01517             # Expiry date in past is request to delete cookie.  This can't be
01518             # in DefaultCookiePolicy, because can't delete cookies there.
01519             try:
01520                 self.clear(domain, path, name)
01521             except KeyError:
01522                 pass
01523             _debug("Expiring cookie, domain='%s', path='%s', name='%s'",
01524                    domain, path, name)
01525             return None
01526 
01527         return Cookie(version,
01528                       name, value,
01529                       port, port_specified,
01530                       domain, domain_specified, domain_initial_dot,
01531                       path, path_specified,
01532                       secure,
01533                       expires,
01534                       discard,
01535                       comment,
01536                       comment_url,
01537                       rest)

Here is the call graph for this function:

Here is the caller graph for this function:

def http.cookiejar.CookieJar._cookies_for_domain (   self,
  domain,
  request 
) [private]

Definition at line 1232 of file cookiejar.py.

01232 
01233     def _cookies_for_domain(self, domain, request):
01234         cookies = []
01235         if not self._policy.domain_return_ok(domain, request):
01236             return []
01237         _debug("Checking %s for cookies to return", domain)
01238         cookies_by_path = self._cookies[domain]
01239         for path in cookies_by_path.keys():
01240             if not self._policy.path_return_ok(path, request):
01241                 continue
01242             cookies_by_name = cookies_by_path[path]
01243             for cookie in cookies_by_name.values():
01244                 if not self._policy.return_ok(cookie, request):
01245                     _debug("   not returning cookie")
01246                     continue
01247                 _debug("   it's a match")
01248                 cookies.append(cookie)
01249         return cookies

Here is the call graph for this function:

Here is the caller graph for this function:

def http.cookiejar.CookieJar._cookies_for_request (   self,
  request 
) [private]
Return a list of cookies to be returned to server.

Definition at line 1250 of file cookiejar.py.

01250 
01251     def _cookies_for_request(self, request):
01252         """Return a list of cookies to be returned to server."""
01253         cookies = []
01254         for domain in self._cookies.keys():
01255             cookies.extend(self._cookies_for_domain(domain, request))
01256         return cookies

Here is the call graph for this function:

def http.cookiejar.CookieJar._cookies_from_attrs_set (   self,
  attrs_set,
  request 
) [private]

Definition at line 1538 of file cookiejar.py.

01538 
01539     def _cookies_from_attrs_set(self, attrs_set, request):
01540         cookie_tuples = self._normalized_cookie_tuples(attrs_set)
01541 
01542         cookies = []
01543         for tup in cookie_tuples:
01544             cookie = self._cookie_from_cookie_tuple(tup, request)
01545             if cookie: cookies.append(cookie)
01546         return cookies

Here is the call graph for this function:

Here is the caller graph for this function:

def http.cookiejar.CookieJar._normalized_cookie_tuples (   self,
  attrs_set 
) [private]
Return list of tuples containing normalised cookie information.

attrs_set is the list of lists of key,value pairs extracted from
the Set-Cookie or Set-Cookie2 headers.

Tuples are name, value, standard, rest, where name and value are the
cookie name and value, standard is a dictionary containing the standard
cookie-attributes (discard, secure, version, expires or max-age,
domain, path and port) and rest is a dictionary containing the rest of
the cookie-attributes.

Definition at line 1349 of file cookiejar.py.

01349 
01350     def _normalized_cookie_tuples(self, attrs_set):
01351         """Return list of tuples containing normalised cookie information.
01352 
01353         attrs_set is the list of lists of key,value pairs extracted from
01354         the Set-Cookie or Set-Cookie2 headers.
01355 
01356         Tuples are name, value, standard, rest, where name and value are the
01357         cookie name and value, standard is a dictionary containing the standard
01358         cookie-attributes (discard, secure, version, expires or max-age,
01359         domain, path and port) and rest is a dictionary containing the rest of
01360         the cookie-attributes.
01361 
01362         """
01363         cookie_tuples = []
01364 
01365         boolean_attrs = "discard", "secure"
01366         value_attrs = ("version",
01367                        "expires", "max-age",
01368                        "domain", "path", "port",
01369                        "comment", "commenturl")
01370 
01371         for cookie_attrs in attrs_set:
01372             name, value = cookie_attrs[0]
01373 
01374             # Build dictionary of standard cookie-attributes (standard) and
01375             # dictionary of other cookie-attributes (rest).
01376 
01377             # Note: expiry time is normalised to seconds since epoch.  V0
01378             # cookies should have the Expires cookie-attribute, and V1 cookies
01379             # should have Max-Age, but since V1 includes RFC 2109 cookies (and
01380             # since V0 cookies may be a mish-mash of Netscape and RFC 2109), we
01381             # accept either (but prefer Max-Age).
01382             max_age_set = False
01383 
01384             bad_cookie = False
01385 
01386             standard = {}
01387             rest = {}
01388             for k, v in cookie_attrs[1:]:
01389                 lc = k.lower()
01390                 # don't lose case distinction for unknown fields
01391                 if lc in value_attrs or lc in boolean_attrs:
01392                     k = lc
01393                 if k in boolean_attrs and v is None:
01394                     # boolean cookie-attribute is present, but has no value
01395                     # (like "discard", rather than "port=80")
01396                     v = True
01397                 if k in standard:
01398                     # only first value is significant
01399                     continue
01400                 if k == "domain":
01401                     if v is None:
01402                         _debug("   missing value for domain attribute")
01403                         bad_cookie = True
01404                         break
01405                     # RFC 2965 section 3.3.3
01406                     v = v.lower()
01407                 if k == "expires":
01408                     if max_age_set:
01409                         # Prefer max-age to expires (like Mozilla)
01410                         continue
01411                     if v is None:
01412                         _debug("   missing or invalid value for expires "
01413                               "attribute: treating as session cookie")
01414                         continue
01415                 if k == "max-age":
01416                     max_age_set = True
01417                     try:
01418                         v = int(v)
01419                     except ValueError:
01420                         _debug("   missing or invalid (non-numeric) value for "
01421                               "max-age attribute")
01422                         bad_cookie = True
01423                         break
01424                     # convert RFC 2965 Max-Age to seconds since epoch
01425                     # XXX Strictly you're supposed to follow RFC 2616
01426                     #   age-calculation rules.  Remember that zero Max-Age is a
01427                     #   is a request to discard (old and new) cookie, though.
01428                     k = "expires"
01429                     v = self._now + v
01430                 if (k in value_attrs) or (k in boolean_attrs):
01431                     if (v is None and
01432                         k not in ("port", "comment", "commenturl")):
01433                         _debug("   missing value for %s attribute" % k)
01434                         bad_cookie = True
01435                         break
01436                     standard[k] = v
01437                 else:
01438                     rest[k] = v
01439 
01440             if bad_cookie:
01441                 continue
01442 
01443             cookie_tuples.append((name, value, standard, rest))
01444 
01445         return cookie_tuples

Here is the call graph for this function:

Here is the caller graph for this function:

def http.cookiejar.CookieJar._process_rfc2109_cookies (   self,
  cookies 
) [private]

Definition at line 1547 of file cookiejar.py.

01547 
01548     def _process_rfc2109_cookies(self, cookies):
01549         rfc2109_as_ns = getattr(self._policy, 'rfc2109_as_netscape', None)
01550         if rfc2109_as_ns is None:
01551             rfc2109_as_ns = not self._policy.rfc2965
01552         for cookie in cookies:
01553             if cookie.version == 1:
01554                 cookie.rfc2109 = True
01555                 if rfc2109_as_ns:
01556                     # treat 2109 cookies as Netscape cookies rather than
01557                     # as RFC2965 cookies
01558                     cookie.version = 0

Here is the call graph for this function:

Here is the caller graph for this function:

def http.cookiejar.CookieJar.add_cookie_header (   self,
  request 
)
Add correct Cookie: header to request (urllib.request.Request object).

The Cookie2 header is also added unless policy.hide_cookie2 is true.

Definition at line 1316 of file cookiejar.py.

01316 
01317     def add_cookie_header(self, request):
01318         """Add correct Cookie: header to request (urllib.request.Request object).
01319 
01320         The Cookie2 header is also added unless policy.hide_cookie2 is true.
01321 
01322         """
01323         _debug("add_cookie_header")
01324         self._cookies_lock.acquire()
01325         try:
01326 
01327             self._policy._now = self._now = int(time.time())
01328 
01329             cookies = self._cookies_for_request(request)
01330 
01331             attrs = self._cookie_attrs(cookies)
01332             if attrs:
01333                 if not request.has_header("Cookie"):
01334                     request.add_unredirected_header(
01335                         "Cookie", "; ".join(attrs))
01336 
01337             # if necessary, advertise that we know RFC 2965
01338             if (self._policy.rfc2965 and not self._policy.hide_cookie2 and
01339                 not request.has_header("Cookie2")):
01340                 for cookie in cookies:
01341                     if cookie.version != 1:
01342                         request.add_unredirected_header("Cookie2", '$Version="1"')
01343                         break
01344 
01345         finally:
01346             self._cookies_lock.release()
01347 
01348         self.clear_expired_cookies()

Here is the call graph for this function:

def http.cookiejar.CookieJar.clear (   self,
  domain = None,
  path = None,
  name = None 
)
Clear some cookies.

Invoking this method without arguments will clear all cookies.  If
given a single argument, only cookies belonging to that domain will be
removed.  If given two arguments, cookies belonging to the specified
path within that domain are removed.  If given three arguments, then
the cookie with the specified name, path and domain is removed.

Raises KeyError if no matching cookie exists.

Definition at line 1653 of file cookiejar.py.

01653 
01654     def clear(self, domain=None, path=None, name=None):
01655         """Clear some cookies.
01656 
01657         Invoking this method without arguments will clear all cookies.  If
01658         given a single argument, only cookies belonging to that domain will be
01659         removed.  If given two arguments, cookies belonging to the specified
01660         path within that domain are removed.  If given three arguments, then
01661         the cookie with the specified name, path and domain is removed.
01662 
01663         Raises KeyError if no matching cookie exists.
01664 
01665         """
01666         if name is not None:
01667             if (domain is None) or (path is None):
01668                 raise ValueError(
01669                     "domain and path must be given to remove a cookie by name")
01670             del self._cookies[domain][path][name]
01671         elif path is not None:
01672             if domain is None:
01673                 raise ValueError(
01674                     "domain must be given to remove cookies by path")
01675             del self._cookies[domain][path]
01676         elif domain is not None:
01677             del self._cookies[domain]
01678         else:
01679             self._cookies = {}

Here is the caller graph for this function:

Discard all expired cookies.

You probably don't need to call this method: expired cookies are never
sent back to the server (provided you're using DefaultCookiePolicy),
this method is called by CookieJar itself every so often, and the
.save() method won't save expired cookies anyway (unless you ask
otherwise by passing a true ignore_expires argument).

Definition at line 1695 of file cookiejar.py.

01695 
01696     def clear_expired_cookies(self):
01697         """Discard all expired cookies.
01698 
01699         You probably don't need to call this method: expired cookies are never
01700         sent back to the server (provided you're using DefaultCookiePolicy),
01701         this method is called by CookieJar itself every so often, and the
01702         .save() method won't save expired cookies anyway (unless you ask
01703         otherwise by passing a true ignore_expires argument).
01704 
01705         """
01706         self._cookies_lock.acquire()
01707         try:
01708             now = time.time()
01709             for cookie in self:
01710                 if cookie.is_expired(now):
01711                     self.clear(cookie.domain, cookie.path, cookie.name)
01712         finally:
01713             self._cookies_lock.release()

Here is the call graph for this function:

Discard all session cookies.

Note that the .save() method won't save session cookies anyway, unless
you ask otherwise by passing a true ignore_discard argument.

Definition at line 1680 of file cookiejar.py.

01680 
01681     def clear_session_cookies(self):
01682         """Discard all session cookies.
01683 
01684         Note that the .save() method won't save session cookies anyway, unless
01685         you ask otherwise by passing a true ignore_discard argument.
01686 
01687         """
01688         self._cookies_lock.acquire()
01689         try:
01690             for cookie in self:
01691                 if cookie.discard:
01692                     self.clear(cookie.domain, cookie.path, cookie.name)
01693         finally:
01694             self._cookies_lock.release()

Here is the call graph for this function:

def http.cookiejar.CookieJar.extract_cookies (   self,
  response,
  request 
)
Extract cookies from response, where allowable given the request.

Definition at line 1639 of file cookiejar.py.

01639 
01640     def extract_cookies(self, response, request):
01641         """Extract cookies from response, where allowable given the request."""
01642         _debug("extract_cookies: %s", response.info())
01643         self._cookies_lock.acquire()
01644         try:
01645             self._policy._now = self._now = int(time.time())
01646 
01647             for cookie in self.make_cookies(response, request):
01648                 if self._policy.set_ok(cookie, request):
01649                     _debug(" setting cookie: %s", cookie)
01650                     self.set_cookie(cookie)
01651         finally:
01652             self._cookies_lock.release()

Here is the call graph for this function:

def http.cookiejar.CookieJar.make_cookies (   self,
  response,
  request 
)
Return sequence of Cookie objects extracted from response object.

Definition at line 1559 of file cookiejar.py.

01559 
01560     def make_cookies(self, response, request):
01561         """Return sequence of Cookie objects extracted from response object."""
01562         # get cookie-attributes for RFC 2965 and Netscape protocols
01563         headers = response.info()
01564         rfc2965_hdrs = headers.get_all("Set-Cookie2", [])
01565         ns_hdrs = headers.get_all("Set-Cookie", [])
01566 
01567         rfc2965 = self._policy.rfc2965
01568         netscape = self._policy.netscape
01569 
01570         if ((not rfc2965_hdrs and not ns_hdrs) or
01571             (not ns_hdrs and not rfc2965) or
01572             (not rfc2965_hdrs and not netscape) or
01573             (not netscape and not rfc2965)):
01574             return []  # no relevant cookie headers: quick exit
01575 
01576         try:
01577             cookies = self._cookies_from_attrs_set(
01578                 split_header_words(rfc2965_hdrs), request)
01579         except Exception:
01580             _warn_unhandled_exception()
01581             cookies = []
01582 
01583         if ns_hdrs and netscape:
01584             try:
01585                 # RFC 2109 and Netscape cookies
01586                 ns_cookies = self._cookies_from_attrs_set(
01587                     parse_ns_headers(ns_hdrs), request)
01588             except Exception:
01589                 _warn_unhandled_exception()
01590                 ns_cookies = []
01591             self._process_rfc2109_cookies(ns_cookies)
01592 
01593             # Look for Netscape cookies (from Set-Cookie headers) that match
01594             # corresponding RFC 2965 cookies (from Set-Cookie2 headers).
01595             # For each match, keep the RFC 2965 cookie and ignore the Netscape
01596             # cookie (RFC 2965 section 9.1).  Actually, RFC 2109 cookies are
01597             # bundled in with the Netscape cookies for this purpose, which is
01598             # reasonable behaviour.
01599             if rfc2965:
01600                 lookup = {}
01601                 for cookie in cookies:
01602                     lookup[(cookie.domain, cookie.path, cookie.name)] = None
01603 
01604                 def no_matching_rfc2965(ns_cookie, lookup=lookup):
01605                     key = ns_cookie.domain, ns_cookie.path, ns_cookie.name
01606                     return key not in lookup
01607                 ns_cookies = filter(no_matching_rfc2965, ns_cookies)
01608 
01609             if ns_cookies:
01610                 cookies.extend(ns_cookies)
01611 
01612         return cookies

Here is the call graph for this function:

Here is the caller graph for this function:

def http.cookiejar.CookieJar.set_cookie (   self,
  cookie 
)
Set a cookie, without checking whether or not it should be set.

Definition at line 1626 of file cookiejar.py.

01626 
01627     def set_cookie(self, cookie):
01628         """Set a cookie, without checking whether or not it should be set."""
01629         c = self._cookies
01630         self._cookies_lock.acquire()
01631         try:
01632             if cookie.domain not in c: c[cookie.domain] = {}
01633             c2 = c[cookie.domain]
01634             if cookie.path not in c2: c2[cookie.path] = {}
01635             c3 = c2[cookie.path]
01636             c3[cookie.name] = cookie
01637         finally:
01638             self._cookies_lock.release()

Here is the caller graph for this function:

def http.cookiejar.CookieJar.set_cookie_if_ok (   self,
  cookie,
  request 
)
Set a cookie if policy says it's OK to do so.

Definition at line 1613 of file cookiejar.py.

01613 
01614     def set_cookie_if_ok(self, cookie, request):
01615         """Set a cookie if policy says it's OK to do so."""
01616         self._cookies_lock.acquire()
01617         try:
01618             self._policy._now = self._now = int(time.time())
01619 
01620             if self._policy.set_ok(cookie, request):
01621                 self.set_cookie(cookie)
01622 
01623 
01624         finally:
01625             self._cookies_lock.release()

Here is the call graph for this function:

def http.cookiejar.CookieJar.set_policy (   self,
  policy 
)

Definition at line 1229 of file cookiejar.py.

01229 
01230     def set_policy(self, policy):
01231         self._policy = policy


Member Data Documentation

Reimplemented in http.cookiejar.FileCookieJar.

Definition at line 1227 of file cookiejar.py.

Definition at line 1226 of file cookiejar.py.

Definition at line 1326 of file cookiejar.py.

Definition at line 1224 of file cookiejar.py.

tuple http.cookiejar.CookieJar.domain_re = re.compile(r"[^.]*") [static]

Definition at line 1216 of file cookiejar.py.

tuple http.cookiejar.CookieJar.dots_re = re.compile(r"^\.+") [static]

Definition at line 1217 of file cookiejar.py.

tuple http.cookiejar.CookieJar.magic_re = re.compile(r"^\#LWP-Cookies-(\d+\.\d+)", re.ASCII) [static]

Reimplemented in http.cookiejar.MozillaCookieJar.

Definition at line 1219 of file cookiejar.py.

Definition at line 1213 of file cookiejar.py.

tuple http.cookiejar.CookieJar.quote_re = re.compile(r"([\"\\])") [static]

Definition at line 1214 of file cookiejar.py.

Definition at line 1215 of file cookiejar.py.


The documentation for this class was generated from the following file: