Lines Matching defs:the

4 HTTP::Cookies, from the libwww-perl library.
6 Docstrings, comments and debug strings in this code refer to the
7 attributes of the HTTP cookie system as cookie-attributes, to distinguish
10 Class diagram (note that BSDDBCookieJar and the MSIE* classes are not
11 distributed with the Python standard library, but are available from
38 import http.client # only for the default HTTP port
41 debug = False # set to True to enable debugging via the logging module
57 MISSING_FILENAME_TEXT = ("a filename was not supplied (nor was the CookieJar "
97 If the function is called without an argument, it will use the current
100 The format of the returned string is like "YYYY-MM-DD hh:mm:ssZ",
116 If the function is called without an argument, it will use the current
119 The format of the returned string is like this:
237 None is returned if the format of str is unrecognized, the time is outside
238 the representable range, or the timezone string is not recognized. If the
241 The timezone in the string may be numerical (like "-0800" or "+0100") or a
242 string timezone (like "UTC", "GMT", "BST" or "EST"). Currently, only the
243 timezone strings equivalent to UTC (zero offset) are known to the function.
245 The function loosely parses the following formats:
257 If the year is given with only 2 digits, the function will select the
258 century that makes the year closest to the current date.
308 As for http2time, but parses the ISO 8601 formats:
327 # XXX there's an extra bit of the timezone I'm ignoring here: is
328 # this the right thing to do?
355 If the header_values passed as argument contains multiple values, then they
359 follow this syntax (BNF as from the HTTP/1.1 specification, but we relax
360 the requirement for tokens).
435 """Do the inverse (almost) of the conversion done by split_header_words.
470 an unquoted "," in the expires field, so we have to use this ad-hoc
473 XXX This may not make the best possible effort to parse all the crap
491 # names and values are legal (the former will only appear once and will
539 # the purposes of RFC 2965)?
540 # For the current implementation, what about IPv6? Remember to look
563 * A is a HDN string and has the form NB, where N is a non-empty
564 name string, B has the form .B', and B' is a HDN string. (So,
568 domain-matches .c.com, but not the reverse.
571 # Note that, if A or B are IP addresses, the only relevant part of the
572 # definition of the domain-match algorithm is the direct string-compare.
581 # A does not have form NB, or N is the empty string
681 # path characters, we pick UTF-8, as recommended in the HTML 4.0
698 - H is the host domain name of a host; and,
700 - H has the form A.B; and
704 - B has at least one embedded dot, or B is the string "local".
705 then the reach of H is .B.
707 * Otherwise, the reach of H is H.
732 host U does not domain-match the reach R of the request-host O in the
749 possible to construct Cookie instances that don't comply with the cookie
750 standards. CookieJar.make_cookies is the factory function for Cookie
752 normalising to the representation used in this class. CookiePolicy is
754 and returned to the server.
756 Note that the port may be present in the headers, but unspecified ("Port"
757 rather than"Port=80", for example); if this is the case, port is None.
787 # Sigh. We need to know whether the domain given in the
789 # (as clarified in draft errata). Needed for the returned $Domain
846 The subclass DefaultCookiePolicy defines the standard rules for Netscape
853 Currently, pre-expired cookies never get this far -- the CookieJar
875 """Implements the standard rules for accepting and returning cookies."""
920 """Return the sequence of blocked domains (as a tuple)."""
923 """Set the sequence of blocked domains."""
933 """Return None, or the sequence of allowed domains (as a tuple)."""
936 """Set the sequence of allowed domains, or None."""
1026 # XXX This should probably be compared with the Konqueror
1327 # intact, due to the poorly-specified Netscape Cookie: syntax)
1392 attrs_set is the list of lists of key,value pairs extracted from
1393 the Set-Cookie or Set-Cookie2 headers.
1395 Tuples are name, value, standard, rest, where name and value are the
1396 cookie name and value, standard is a dictionary containing the standard
1398 domain, path and port) and rest is a dictionary containing the rest of
1399 the cookie-attributes.
1417 # cookies should have the Expires cookie-attribute, and V1 cookies
1487 # standard is dict of standard cookie-attributes, rest is dict of the
1496 # set the easy defaults
1635 # For each match, keep the RFC 2965 cookie and ignore the Netscape
1637 # bundled in with the Netscape cookies for this purpose, which is
1681 """Extract cookies from response, where allowable given the request."""
1697 removed. If given two arguments, cookies belonging to the specified
1699 the cookie with the specified name, path and domain is removed.
1722 Note that the .save() method won't save session cookies anyway, unless
1738 sent back to the server (provided you're using DefaultCookiePolicy),
1739 this method is called by CookieJar itself every so often, and the
1781 Cookies are NOT loaded from the named file until either the .load() or
1808 Raises LoadError (or OSError) if reversion is not successful; the
1832 """Return string representation of Cookie in the LWP cookie file format.
1834 Actually, the format is extended a bit -- see module docstring.
1862 "Set-Cookie3" is the format used by the libwww-perl library, not known
1987 bugs in the past!
1989 This class differs from CookieJar only in the format it uses to save and
1990 load cookies to and from a file. This class uses the Mozilla/Netscape
1993 Don't expect cookies saved while the browser is running to be noticed by
1994 the browser (in fact, Mozilla on unix will overwrite your saved cookies if
1996 save at all while the browser is running).
1998 Note that the Mozilla/Netscape format will downgrade RFC2965 cookies to
2001 In particular, the cookie version and port number information is lost,
2003 specified by the Set-Cookie2 (or Set-Cookie) header, and whether or not the
2004 domain as set in the HTTP header started with a dot (yes, I'm aware some
2008 Note that though Mozilla and Netscape use the same format, they use
2009 slightly different headers. The class saves cookies using the Netscape
2031 # the line is prepended with "#HttpOnly_"