python (3.12.0)

(root)/
lib/
python3.12/
http/
__pycache__/
cookiejar.cpython-312.opt-1.pyc

̑e~.jdZgdZddlZddlZddlZddlZddlZddlZddl	Zddl
ZddlZ
ddlmZdZdadZdZdZee
j,j.Zej2d	Zd
ZdZdZd
ZdZgdZ gdZ!e!Dcgc]}|jEc}Z#dKdZ$dKdZ%dddddZ&ej2dejNZ(dZ)dZ*ej2dejNZ+ej2dejXejNzZ-ej2dej\ejNzZ/dZ0ej2dej\ejNzZ1dZ2dZ3ej2dZ4ej2dZ5ej2d Z6ej2d!Z7d"Z8ej2d#Z9d$Z:d%Z;d&Z<ej2d'ejNZ=d(Z>d)Z?d*Z@d+ZAej2d,ejNZBd-ZCd.ZDd/ZEd0ZFd1ZGej2d2ZHd3ZId4ZJd5ZKd6ZLGd7d8ZMGd9d:ZNGd;d<eNZOd=ZPGd>d?ZQGd@dAZRGdBdCeSZTGdDdEeRZUdFZVGdGdHeUZWGdIdJeUZXycc}w)LaHTTP cookie handling for web clients.

This module has (now fairly distant) origins in Gisle Aas' Perl module
HTTP::Cookies, from the libwww-perl library.

Docstrings, comments and debug strings in this code refer to the
attributes of the HTTP cookie system as cookie-attributes, to distinguish
them clearly from Python attributes.

Class diagram (note that BSDDBCookieJar and the MSIE* classes are not
distributed with the Python standard library, but are available from
http://wwwsearch.sf.net/):

                        CookieJar____
                        /     \      \
            FileCookieJar      \      \
             /    |   \         \      \
 MozillaCookieJar | LWPCookieJar \      \
                  |               |      \
                  |   ---MSIEBase |       \
                  |  /      |     |        \
                  | /   MSIEDBCookieJar BSDDBCookieJar
                  |/
               MSIECookieJar

)Cookie	CookieJarCookiePolicyDefaultCookiePolicy
FileCookieJarLWPCookieJar	LoadErrorMozillaCookieJarN)timegmFcjtsytsddl}|jdatj|S)Nr
zhttp.cookiejar)debugloggerlogging	getLogger)argsrs  B/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/http/cookiejar.py_debugr,s.""#34<<HTTPOnlyz
#HttpOnly_z#( Netscape)? HTTP Cookie FilezQa filename was not supplied (nor was the CookieJar instance initialised with one)zr# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html
# This is a generated file!  Do not edit.

cddl}ddl}ddl}|j}|j	d||j}|j
d|zdy)Nr
zhttp.cookiejar bug!
%s)
stacklevel)iowarnings	tracebackStringIO	print_excgetvaluewarn)rrrfmsgs     r_warn_unhandled_exceptionr"BsF#"

A
a 
**,CMM+c1aM@ric|dd\}}}}}}|tk\rPd|cxkrdkrEnyd|cxkrdkr7nyd|cxkrdkr)nyd|cxkrdkrnyd|cxkrdkr
t|Syy)	Nr
;=)
EPOCH_YEARr)ttyearmonthmdayhourminsecs       r_timegmr3Qs(*2A%D%tS#	
	!u"2"2	:;db
db !C~2~56NNbz5Cr)MonTueWedThuFriSatSun)JanFebMarAprMayJunJulAugSepOctNovDeccP|/tjjtj}n/tjj|tj}d|j|j
|j|j|j|jfzS)aHReturn a string representing time in seconds since epoch, t.

    If the function is called without an argument, it will use the current
    time.

    The format of the returned string is like "YYYY-MM-DD hh:mm:ssZ",
    representing Universal Time (UTC, aka GMT).  An example of this format is:

    1994-11-24 08:49:37Z

    tzz%04d-%02d-%02d %02d:%02d:%02dZ)
datetimenowUTC
fromtimestampr-r.dayr0minutesecondtdts  r	time2isozrT^s	y



"
"hll
"
3



,
,Q8<<
,
@+
266277BIIryy/BBBrc|/tjjtj}n/tjj|tj}dt|j|jt|jdz
|j|j|j|jfzS)zReturn a string representing time in seconds since epoch, t.

    If the function is called without an argument, it will use the current
    time.

    The format of the returned string is like this:

    Wed, DD-Mon-YYYY HH:MM:SS GMT

    rHz#%s, %02d-%s-%04d %02d:%02d:%02d GMTr%)
rJrKrLrMDAYSweekdayrNMONTHSr.r-r0rOrPrQs  r
time2netscaperYqs	y



"
"hll
"
3



,
,Q8<<
,
@0RZZ\BFFF288A:$6
"))RYY4000r)GMTrLUTZz^([-+])?(\d\d?):?(\d\d)?$cd}|tvrd}|Stj|}|redt|j	dz}|j	dr |dt|j	dzz}|j	ddk(r|}|S)Nr
ir<r%-)	UTC_ZONESTIMEZONE_REsearchintgroup)rIoffsetms   roffset_from_tz_stringrhs
F	YM
r"C
O+Fwwqz"s1771:"66wwqzS  Mrc	t|}|tjkDry	tj	|jdz}|d}|d}|d}t|}t|}t|}t|}|dkr\tjtjd}|dz}	|}
||z|	z
}|	|
z
}	t|	dkDr|	dkDr|dz}n|dz
}t|||||||f}|'|d}|j}t|}|y||z
}|S#t$r5	t|}n#t$rYYywxYwd|cxkrdkrnYy|}nYyYwxYw)Nr%r&r
id2rL)
rdrJMAXYEARMONTHS_LOWERindexlower
ValueErrortime	localtimeabsr3upperrh)
rNmonyrhrr1r2rIimoncur_yrrgtmprRrfs
             r	_str2timer{s	RB	H  -a/
z2
{!C
{!C

c(C	RB

c(C

c(C	Dy		,Q/SL
&[1_
Gq6B;1u28bCx"	S#r3R01A}
:B
XXZ&r*>
JH[		s8D		??C
	s;&D	E'D32E3	E<E?EEEEzV^[SMTWF][a-z][a-z], (\d\d) ([JFMASOND][a-z][a-z]) (\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$z+^(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)[a-z]*,?\s*a^
    (\d\d?)            # day
       (?:\s+|[-\/])
    (\w+)              # month
        (?:\s+|[-\/])
    (\d+)              # year
    (?:
          (?:\s+|:)    # separator before clock
       (\d\d?):(\d\d)  # hour:min
       (?::(\d\d))?    # optional seconds
    )?                 # optional clock
       \s*
    (?:
       ([-+]?\d{2,4}|(?![APap][Mm]\b)[A-Za-z]+) # timezone
       \s*
    )?
    (?:
       \(\w+\)         # ASCII representation of timezone in parens.
       \s*
    )?$c	.tj|}|r|j}tj	|djdz}t
|d|t
|dt
|dt
|dt|df}t|S|j}tjd|d}dgd	z\}}}}}}	}
tj|}||j\}}}}}}	}
nyt||||||	|
S)
aReturns time in seconds since epoch of time represented by a string.

    Return value is an integer.

    None is returned if the format of str is unrecognized, the time is outside
    the representable range, or the timezone string is not recognized.  If the
    string contains no timezone, UTC is assumed.

    The timezone in the string may be numerical (like "-0800" or "+0100") or a
    string timezone (like "UTC", "GMT", "BST" or "EST").  Currently, only the
    timezone strings equivalent to UTC (zero offset) are known to the function.

    The function loosely parses the following formats:

    Wed, 09 Feb 1994 22:23:32 GMT       -- HTTP format
    Tuesday, 08-Feb-94 14:15:29 GMT     -- old rfc850 HTTP format
    Tuesday, 08-Feb-1994 14:15:29 GMT   -- broken rfc850 HTTP format
    09 Feb 1994 22:23:32 GMT            -- HTTP format (no weekday)
    08-Feb-94 14:15:29 GMT              -- rfc850 format (no weekday)
    08-Feb-1994 14:15:29 GMT            -- broken rfc850 format (no weekday)

    The parser ignores leading and trailing whitespace.  The time may be
    absent.

    If the year is given with only 2 digits, the function will select the
    century that makes the year closest to the current date.

    r%rr
r^N)STRICT_DATE_RErcgroupsrmrnrordfloatr3lstrip
WEEKDAY_REsubLOOSE_HTTP_DATE_REr{)textrggrur,rNrvrwr1r2rIs           r	http2timers<	d#A
HHJ  1.2!A$ic!A$i!A$iQqTE!A$K1r{
;;=D>>"dA&D'+VAX"Cb"c3	!!$'A})*&S"b#sBS#r2sC44ra^
    (\d{4})              # year
       [-\/]?
    (\d\d?)              # numerical month
       [-\/]?
    (\d\d?)              # day
   (?:
         (?:\s+|[-:Tt])  # separator before clock
      (\d\d?):?(\d\d)    # hour:min
      (?::?(\d\d(?:\.\d*)?))?  # optional seconds (and fractional)
   )?                    # optional clock
      \s*
   (?:
      ([-+]?\d\d?:?(:?\d\d)?
       |Z|z)             # timezone  (Z is "zero meridian", i.e. GMT)
      \s*
   )?$c	|j}dgdz\}}}}}}}tj|}||j\}}}}}}}}	nyt	|||||||S)av
    As for http2time, but parses the ISO 8601 formats:

    1994-02-03 14:15:29 -0100    -- ISO 8601 format
    1994-02-03 14:15:29          -- zone is optional
    1994-02-03                   -- only date
    1994-02-03T14:15:29          -- Use T as separator
    19940203T141529Z             -- ISO 8601 compact format
    19940203                     -- only date

    Nr)rISO_DATE_RErcrr{)
rrNrurvrwr1r2rIrg_s
          riso2timer2sz;;=D'+VAX"Cb"c3	4 A}-.HHJ)Cb#sBS#r2sC44rch|jd\}}|jd||j|dzS)z)Return unmatched part of re.Match object.r
N)spanstring)matchstartends   r	unmatchedrSs4AJE3<<ST 222rz^\s*([^=\s;,]+)z&^\s*=\s*\"([^\"\\]*(?:\\.[^\"\\]*)*)\"z^\s*=\s*([^\s;,]*)z\\(.)cg}|D]^}|}g}|r?tj|}|rt|}|jd}tj|}|r3t|}|jd}t
j
d|}nFtj|}|r-t|}|jd}|j}nd}|j||fnd|jjdr)|jdd}|r|j|g}ntjdd|\}}	|}|r?|sN|j|a|S)amParse header values into a list of lists containing key,value pairs.

    The function knows how to deal with ",", ";" and "=" as well as quoted
    values after "=".  A list of space separated tokens are parsed as if they
    were separated by ";".

    If the header_values passed as argument contains multiple values, then they
    are treated as if they were a single value separated by comma ",".

    This means that this function is useful for parsing header fields that
    follow this syntax (BNF as from the HTTP/1.1 specification, but we relax
    the requirement for tokens).

      headers           = #header
      header            = (token | parameter) *( [";"] (token | parameter))

      token             = 1*<any CHAR except CTLs or separators>
      separators        = "(" | ")" | "<" | ">" | "@"
                        | "," | ";" | ":" | "\" | <">
                        | "/" | "[" | "]" | "?" | "="
                        | "{" | "}" | SP | HT

      quoted-string     = ( <"> *(qdtext | quoted-pair ) <"> )
      qdtext            = <any TEXT except <">>
      quoted-pair       = "\" CHAR

      parameter         = attribute "=" value
      attribute         = token
      value             = token | quoted-string

    Each header is represented by a list of key/value pairs.  The value for a
    simple token (not part of a parameter) is None.  Syntactically incorrect
    headers will not necessarily be parsed as you would want.

    This is easier to describe with some examples:

    >>> split_header_words(['foo="bar"; port="80,81"; discard, bar=baz'])
    [[('foo', 'bar'), ('port', '80,81'), ('discard', None)], [('bar', 'baz')]]
    >>> split_header_words(['text/html; charset="iso-8859-1"'])
    [[('text/html', None), ('charset', 'iso-8859-1')]]
    >>> split_header_words([r'Basic realm="\"foo\bar\""'])
    [[('Basic', None), ('realm', '"foobar"')]]

    r%z\1N,z^[=\s;]*r)HEADER_TOKEN_RErcrreHEADER_QUOTED_VALUE_REHEADER_ESCAPE_RErHEADER_VALUE_RErstripappendr
startswithresubn)

header_valuesresultr	orig_textpairsrgnamevaluenon_junk
nr_junk_charss
          rsplit_header_wordsr\sM\F#'	&&t,A |wwqz*11$7$Q<DGGAJE,00>E'..t4A(| !
 %!%dE]+))#.{{}QR(&--.+-''+r4*H'- ?@&--&G#'HMr([\"\\])c*g}|D]|}g}|D]P\}}|8tjd|stjd|}d|z}|d|}|j	|R|s]|j	dj|~dj|S)aDo the inverse (almost) of the conversion done by split_header_words.

    Takes a list of lists of (key, value) pairs and produces a single header
    value.  Attribute values are quoted if needed.

    >>> join_header_words([[("text/plain", None), ("charset", "iso-8859-1")]])
    'text/plain; charset="iso-8859-1"'
    >>> join_header_words([[("text/plain", None)], [("charset", "iso-8859-1")]])
    'text/plain, charset="iso-8859-1"'

    z^\w+$\\\1z"%s"=; , )rrcHEADER_JOIN_ESCAPE_RErrjoin)listsheadersrattrkvs      rjoin_header_wordsrsG	1	DAq}yy1--11'1=A
A !$KKN
			$0	199Wrc^|jdr|dd}|jdr|dd}|S)N"r%)rendswithrs rstrip_quotesrs5sABx}}SCRyKrcd}g}|D]}g}d}t|jdD]\}}|j}|jd\}}	}
|j}|s|dk(rnuE|	r|
jnd}
|dk7rF|j	}||vr|}|dk(r|
t|
}
d}n|d	k(r|
t
t|
}
|j||
f|s|s|jd
|j||S)a5Ad-hoc parser for Netscape protocol cookie-attributes.

    The old Netscape cookie format for Set-Cookie can for instance contain
    an unquoted "," in the expires field, so we have to use this ad-hoc
    parser instead of split_header_words.

    XXX This may not make the best possible effort to parse all the crap
    that Netscape Cookie headers contain.  Ronald Tschalar's HTTPClient
    parser is probably better, so could do worse than following that if
    this ever gives any trouble.

    Currently, this is also used for parsing RFC 2109 cookies.

    )expiresdomainpathsecureversionportmax-ageF;rr
NrTr)r0)	enumeratesplitstrip	partitionrorrr)
ns_headersknown_attrsr	ns_headerrversion_setiiparamkeysepvallcs            rparse_ns_headersrs)1KF+!	#9??3#78	%IBKKME!OOC0MCc))+C7"%#))+$CQwYY[$C)#*3/"&KI%'S(9:LL#s$=	%@-.MM% W+!ZMrz\.\d+$c^tj|ry|dk(ry|ddk(s|ddk(ryy)z*Return True if text is a host domain name.Frr
.rTIPV4_RErcrs ris_HDNrs8~~drzAw#~bSrc|j}|j}||k(ryt|sy|j|}|dk(s|dk(ry|jdsyt|ddsyy)aReturn True if domain A domain-matches domain B, according to RFC 2965.

    A and B may be host domain names or IP addresses.

    RFC 2965, section 1:

    Host names can be specified either as an IP address or a HDN string.
    Sometimes we compare one host name with another.  (Such comparisons SHALL
    be case-insensitive.)  Host A's name domain-matches host B's if

         *  their host name strings string-compare equal; or

         * A is a HDN string and has the form NB, where N is a non-empty
            name string, B has the form .B', and B' is a HDN string.  (So,
            x.y.com domain-matches .Y.com but not Y.com.)

    Note that domain-match is not a commutative operation: a.b.c.com
    domain-matches .c.com, but not the reverse.

    TFrr
rr%N)rorrfindr)ABis   rdomain_matchr&sm.	
	A		AAv!9	
ABw!q&<<!AB%=rc0tj|ryy)zdReturn True if text is a sort-of-like a host domain name.

    For accepting/blocking domains.

    FTrrs rliberal_is_HDNrMs~~drc|j}|j}t|rt|s||k(ryy|jd}|r|j|ry|s||k(ryy)z\For blocking/accepting domains.

    A and B may be host domain names or IP addresses.

    TFr)rorrr)rrinitial_dots   ruser_domain_matchrWsc	
	A		A1."36,,s#Kqzz!}16rz:\d+$c|j}tjj|d}|dk(r|j	dd}t
j
d|d}|jS)zReturn request-host, as defined by RFC 2965.

    Variation from RFC: returned value is lowercased, for convenient
    comparison.

    r%rHost)get_full_urlurllibparseurlparse
get_headercut_port_rerro)requesturlhosts   rrequest_hostrlsd


 C<<  %a(Drz!!&"-??2tQ'D::<rc6t|x}}d|vr|dz}||fS)zzReturn a tuple (request-host, effective request-host name).

    As defined by RFC 2965, except both are lowercased.

    r.local)r)rerhnreq_hosts   reff_request_hostr|s/#7++D8
(("T>rc|j}tjj|}t	|j
}|j
dsd|z}|S)z6Path component of request-URI, as defined by RFC 2965./)rrrurlsplitescape_pathrr)rrpartsrs    rrequest_pathrsL



 CLL!!#&Euzz"D??3TzKrc|j}|jd}|dk\r||dzd}	t||St
}|S#t$rt	d|YywxYw)N:r
r%znonnumeric port: '%s')rfindrdrprDEFAULT_HTTP_PORT)rrrrs    rrequest_portrsl<<D		#AAvAaCDz	IK!K	*D1	sAAAz%/;:@&=+$,!~*'()z%([0-9a-fA-F][0-9a-fA-F])cFd|jdjzS)Nz%%%sr%)rert)rs ruppercase_escaped_charrsEKKN((***rctjj|t}tjt|}|S)zEEscape any invalid characters in HTTP URL, and uppercase all escapes.)rrquoteHTTP_PATH_SAFEESCAPED_CHAR_RErr)rs rrrs2<<dN3D5t<DKrc|jd}|dk\r3||dzd}|jd}t|r|dk\s|dk(rd|zS|S)aBReturn reach of host h, as defined by RFC 2965, section 1.

    The reach R of a host name H is defined as follows:

       *  If

          -  H is the host domain name of a host; and,

          -  H has the form A.B; and

          -  A has no embedded (that is, interior) dots; and

          -  B has at least one embedded dot, or B is the string "local".
             then the reach of H is .B.

       *  Otherwise, the reach of H is H.

    >>> reach("www.acme.com")
    '.acme.com'
    >>> reach("acme.com")
    'acme.com'
    >>> reach("acme.local")
    '.local'

    rr
r%Nlocal)rr)hrbs   rreachr
sU4	
sAAv
acdG
FF3K!9!q&ALq5LHrcZt|}t|t|jsyy)z

    RFC 2965, section 3.3.6:

        An unverifiable transaction is to a third-party host if its request-
        host U does not domain-match the reach R of the request-host O in the
        origin transaction.

    TF)rrr
origin_req_host)rrs  ris_third_partyrs)G$H%(?(?"@ArcBeZdZdZ	d
dZdZddZdZddZdZ	d	Z
y)raHTTP 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.

    c|t|}|tt|}||durtd||_||_||_||_||_|j|_	||_
||_|	|_|
|_
||_||_|
|_||_||_||_t)j(||_y)NTz-if port is None, port_specified must be false)rdrrprrrrport_specifiedrordomain_specifieddomain_initial_dotrpath_specifiedrrdiscardcommentcomment_urlrfc2109copy_rest)selfrrrrrrrrrrrrrrrrestrs                  r__init__zCookie.__init__s#g,#eGn*=<Nd2LMM	
	,lln 0
#5	,&YYt_
rc||jvSNr)rrs  rhas_nonstandard_attrzCookie.has_nonstandard_attr#stzz!!rNc:|jj||Sr!)rget)rrdefaults   rget_nonstandard_attrzCookie.get_nonstandard_attr%szz~~dG,,rc"||j|<yr!r")rrrs   rset_nonstandard_attrzCookie.set_nonstandard_attr's 

4rch|tj}|j|j|kryyNTF)rqr)rrKs  r
is_expiredzCookie.is_expired*s,;diikLL$4<<3+>rc|jd}nd|jz}|j|z|jz}|j|jd|j}n|j}d|d|dS)Nrrrz<Cookie z for >)rrrrr)rplimit	namevalues    r__str__zCookie.__str__0sd99"adii-aa$))+::!#'99djj9I		I'0%88rc\g}dD]-}t||}|j|dt|/|jdt|jz|jdt|jz|j
jddj|dS)N)rrrrrrrrrrrrrrrrzrest=%sz
rfc2109=%s(r))getattrrreprrr	__class____name__r)rrrrs    r__repr__zCookie.__repr__:s	6D4&DKK4d45	6	
ITZZ 001L4#556>>22DIIdODDr)Fr!)r9
__module____qualname____doc__rr#r'r)r,r2r:rrrrs16(%T"-!9Errc(eZdZdZdZdZdZdZy)ra 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 customized policy.

    ct)zReturn 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.

        NotImplementedErrorrcookiers   rset_okzCookiePolicy.set_okRs
"##rct)zAReturn true if (and only if) cookie should be returned to server.rArCs   r	return_okzCookiePolicy.return_ok[!##rcy)zMReturn false if cookies should not be returned, given cookie domain.
        Tr>)rrrs   rdomain_return_okzCookiePolicy.domain_return_ok_rcy)zKReturn false if cookies should not be returned, given cookie path.
        Tr>)rrrs   rpath_return_okzCookiePolicy.path_return_okdrKrN)r9r;r<r=rErGrJrMr>rrrrIs$$
rrc
eZdZdZdZdZdZdZeezZdddddddddeddd	f
d
Z	dZ
dZd
ZdZ
dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd Zy)!rzBImplements the standard rules for accepting and returning cookies.r%rr}r
NTF)httpswssc||_||_||_||_||_||_|	|_|
|_||_||_	|
|_
|t||_nd|_|t|}||_
y)zAConstructor arguments should be passed as keyword arguments only.Nr>)netscaperfc2965rfc2109_as_netscapehide_cookie2
strict_domainstrict_rfc2965_unverifiablestrict_ns_unverifiablestrict_ns_domainstrict_ns_set_initial_dollarstrict_ns_set_pathsecure_protocolstuple_blocked_domains_allowed_domains)rblocked_domainsallowed_domainsrRrSrTrUrVrWrXrYrZr[r\s              rrzDefaultCookiePolicy.__init__ts!
#6 (*+F(&<# 0,H)"4 0&$)/$:D!$&D!&#O4O /rc|jS)z4Return the sequence of blocked domains (as a tuple).)r^rs rr`z#DefaultCookiePolicy.blocked_domains$$$rc$t||_y)z$Set the sequence of blocked domains.N)r]r^)rr`s  rset_blocked_domainsz'DefaultCookiePolicy.set_blocked_domainss %o 6rcB|jD]}t||syyr+)r^r)rrblocked_domains   r
is_blockedzDefaultCookiePolicy.is_blockeds)"33	N 8	rc|jS)z=Return None, or the sequence of allowed domains (as a tuple).)r_rcs rraz#DefaultCookiePolicy.allowed_domainsrdrc,|t|}||_y)z-Set the sequence of allowed domains, or None.N)r]r_)rras  rset_allowed_domainsz'DefaultCookiePolicy.set_allowed_domainss&#O4O /rc\|jy|jD]}t||syy)NFT)r_r)rrallowed_domains   ris_not_allowedz"DefaultCookiePolicy.is_not_alloweds8  ("33	N 8	rctd|j|jdD]}d|z}t||}|||ryy)z
        If you override .set_ok(), be sure to call this method.  If it returns
        false, so should your subclass (assuming your subclass wants to be more
        strict about which cookies to accept).

         - checking cookie %s=%s)r
verifiabilityrrrrset_ok_FTrrrr6rrDrnfn_namefns      rrEzDefaultCookiePolicy.set_oksR	)6;;EN	AkGw'Bfg&		rc|j"td|j|jy|jdkDr|jstdy|jdk(r|j
stdyy)Nz0   Set-Cookie2 without version attribute (%s=%s)Fr
$   RFC 2965 cookies are switched off$   Netscape cookies are switched offT)rrrrrSrRrCs   rset_ok_versionz"DefaultCookiePolicy.set_ok_versionsh>>!
E;;
.>>Adll9:
^^q
 9:rc|jrYt|rN|jdkDr|jrt	dy|jdk(r|j
rt	dyyNr
z>   third-party RFC 2965 cookie during unverifiable transactionFz>   third-party Netscape cookie during unverifiable transactionTunverifiablerrrWrrXrCs   rset_ok_verifiabilityz(DefaultCookiePolicy.set_ok_verifiabilitys]N7$;~~!d&F&F891$)D)D89rc|jdk(r>|jr2|jjdrt	d|jyy)Nr
$z'   illegal name (starts with '$'): '%s'FT)rrZrrrrCs   rset_ok_namezDefaultCookiePolicy.set_ok_names?
NNaD$E$EKK""3'<fkkJrc|jrit|}|jdkDs|jdk(r@|jr4|j	|j
|st
d|j
|yy)Nr
z7   path attribute %s is not a prefix of request path %sFT)rrrr[rMrr)rrDrreq_paths    rset_ok_pathzDefaultCookiePolicy.set_ok_pathse  #G,H!#..A%$*A*A''W=!"(++x9rc|j|jrtd|jy|j|jrtd|jy|jrt|\}}|j}|jrz|jddk\rf|jd}|jdd|}|dk(r=||dzd}||dz|}	|	jdvrt|dk(r
td	|y|jdr|dd}
n|}
|
jddk\}|s|jd
s
td|y|jdk(rX|j|sG|j|
d
s3|jds"d|zj|std||y|jdkDs|j|j zrt#||std
||y|jdkDs|j|j$zrF|dt|}|jddk\r#t&j)|std||yy)N"   domain %s is in user block-listF&   domain %s is not in user allow-listrrr
r%)coaccomeduorgnetgovmilrdaerobizcatcoopinfojobsmobimuseumrprotraveleuz&   country-code second level domain %srz/   non-local domain %s contains no embedded dotzO   effective request-host %s (even with added initial dot) does not end with %sz5   effective request-host %s does not domain-match %sz.   host prefix %s for domain %s contains a dotT)rirrrorrrVcountrrolenrrrrrYDomainRFC2965MatchrDomainStrictNoDotsrrc)
rrDrrrrrjtldsldundotted_domain
embedded_dotshost_prefixs
             r
set_ok_domainz!DefaultCookiePolicy.set_ok_domainsO??6==)7Gv}}-;V]]K""-g6NHd]]F!!v||C'8A'=LL%LLa+6 1,C 1Q-Cyy{''',/s8q=GP$  %"(*"(,11#6!;M x)@H~~"v./):&'AB-d(,,V4?)!"&&)@)@@#D&1 !%v/ "&&)@)@@&}V5$$S)Q.x0K&0 rc |jrft|}|d}nt|}|jj	dD]}	t|||k(sytd||jyy#t$rtd|YywxYw)N80rz   bad port %s (not numeric)Fz$   request port (%s) not found in %sT)rrstrrrrdrprrrDrreq_portr/s     rset_ok_portzDefaultCookiePolicy.set_ok_port3s  #G,Hx=[[&&s+
!F=

=."!91= !sA44B
B
ctd|j|jdD]}d|z}t||}|||ryy)z
        If you override .return_ok(), be sure to call this method.  If it
        returns false, so should your subclass (assuming your subclass wants to
        be more strict about which cookies to return).

        rq)rrrrrrr
return_ok_FTrtrus      rrGzDefaultCookiePolicy.return_okHsO	)6;;ER	A"1nGw'Bfg&		
rc|jdkDr|jstdy|jdk(r|jstdyy)Nr
rzFr{T)rrSrrRrCs   rreturn_ok_versionz%DefaultCookiePolicy.return_ok_versionZsA>>Adll9:
^^q
 9:rc|jrYt|rN|jdkDr|jrt	dy|jdk(r|j
rt	dyyr~rrCs   rreturn_ok_verifiabilityz+DefaultCookiePolicy.return_ok_verifiabilitycs]N7$;~~!d&F&F%&1$)D)D%&rcd|jr$|j|jvrtdyy)Nz(   secure cookie with non-secure requestFT)rtyper\rrCs   rreturn_ok_securez$DefaultCookiePolicy.return_ok_secureos)==W\\1F1FF=>rcR|j|jrtdyy)Nz   cookie expiredFT)r,_nowrrCs   rreturn_ok_expiresz%DefaultCookiePolicy.return_ok_expiresus#TYY'&'rc|jrNt|}|d}|jjdD]	}||k(s	ytd||jyy)Nrrz0   request port %s does not match cookie port %sFT)rrrrrs     rreturn_ok_portz"DefaultCookiePolicy.return_ok_port{sg;;#G,H[[&&s+
=

I.rct|\}}|j}|r|jdsd|z}n|}|jdk(r6|j|j
zr|js||k7rtdy|jdkDrt||std||y|jdk(r"d|zj|std||yy)Nrr
zQ   cookie with unspecified domain does not string-compare equal to request domainFzQ   effective request-host name %s does not domain-match RFC 2965 cookie domain %sz;   request-host %s does not match Netscape cookie domain %sT)
rrrrrYDomainStrictNonDomainrrrr)rrDrrrr	dotdomains       rreturn_ok_domainz$DefaultCookiePolicy.return_ok_domains)'2$&++C0fII
NNa

"
"T%?%?
?''FdN-
.>>Al4&@/04f
>>>QD':':9'E!6
+rclt|\}}|jdsd|z}|jdsd|z}|r|jdsd|z}n|}|j|s|j|sy|j|r
t	d|y|j|r
t	d|yy)NrFrrT)rrrrirro)rrrrrrs      rrJz$DefaultCookiePolicy.domain_return_oks*'2$""3'8|Hs#t8D&++C0fII!!),

i0H??6"7@v&;VDrctd|t|}t|}||k(ry|j|r|j	ds|||dzdk(rytd||y)Nz- checking cookie path=%sTrr%z  %s does not path-match %sF)rrrrr)rrrrpathlens     rrMz"DefaultCookiePolicy.path_return_oksj*D1(d)t!!$'}}S!Xggai%@C%G,h=r) r9r;r<r=rrr
DomainLiberalDomainStrictrr`rfrirarlrorEr|rrrrrrGrrrrrrrJrMr>rrrrjsLM%&;;L"&t%)#$-1(-"/.3$)"2!0F%7%0&

	:x*$
64rrc#Kt|jD]-}d}	|jd}t|Ed{|r*|/y7#t$rYwxYww)z)Iterates over nested mapping, depth-firstFTN)listvaluesitems
deepvaluesAttributeError)mappingobjs  rrrsfGNN$%
	'IIG!#&&I

'			s7AAAA
AA	AAAAceZdZy)AbsentNr9r;r<r>rrrrrrceZdZdZej
dZej
dZej
dZej
dZ	ej
dZ
ej
dejZdd	Z
d
ZdZdZd
ZdZdZdZdZdZdZdZdZdZddZdZdZdZdZdZ dZ!y) rzCollection of HTTP cookies.

    You may not need to know about this class: try
    urllib.request.build_opener(HTTPCookieProcessor).open(url).
    z\Wrz\.?[^.]*z[^.]*z^\.+z^\#LWP-Cookies-(\d+\.\d+)Ncj|
t}||_tj|_i|_yr!)r_policy
_threadingRLock
_cookies_lock_cookiesrpolicys  rrzCookieJar.__init__s.>(*F'--/
rc||_yr!)rrs  r
set_policyzCookieJar.set_policys	rcg}|jj||sgStd||j|}|j	D]}}|jj||s ||}|j
D]F}|jj||std+td|j|H|S)Nz!Checking %s for cookies to returnz   not returning cookiez   it's a match)	rrJrrkeysrMrrGr)rrrcookiescookies_by_pathrcookies_by_namerDs        r_cookies_for_domainzCookieJar._cookies_for_domains||,,VW=I2F;--/#((*		'D<<..tW=-d3O)002
'||--fg>45()v&
'			'rcg}|jjD]#}|j|j||%|S)z2Return a list of cookies to be returned to server.)rrextendr)rrrrs    r_cookies_for_requestzCookieJar._cookies_for_request
sCmm((*	FFNN433FGDE	Frc|jddd}g}|D]}|j}|sd}|dkDr|jd|z|jQ|jj|jr,|dkDr'|jjd|j}n|j}|j|j|jn |j|jd	||dkDs|jr|jd
|jz|jjdrB|j}|js|jdr|dd}|jd
|z|jyd}|jr|d|jzz}|j||S)zReturn 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).

        c,t|jSr!)rr)as r<lambda>z)CookieJar._cookie_attrs.<locals>.<lambda>s3qvv;rT)rreverseFr
z$Version=%sNrrz
$Path="%s"rr%z$Domain="%s"z$Portz="%s")sortrrrnon_word_rercquote_rerrrrrrrrr)	rrrattrsrDrrrr/s	         r
_cookie_attrszCookieJar._cookie_attrss	.=(	$FnnG"Q;LL!89
)  ''5'A+

))'6<<@||#V[[)U;<{((LL!;<==++C0#]]F"55))#.!'LL&!89;;*A,,6;;!67LLOQ(	$Trctd|jj	tt	jx|j
_|_|j|}|j|}|r2|jds!|jddj||j
jrQ|j
js;|jds*|D]%}|jdk7s|jddn|jj|j!y#|jjwxYw)zAdd correct Cookie: header to request (urllib.request.Request object).

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

        add_cookie_headerrrCookie2r%z$Version="1"N)rracquirerdrqrrrr
has_headeradd_unredirected_headerrrSrUrreleaseclear_expired_cookies)rrrrrDs     rrzCookieJar.add_cookie_headerLs	"#""$	),/		,<<DLL	//8G&&w/E))(333 $))E"24$$T\\-F-F&&y1%F~~*77	>R
&&(""$
&&(sCEEEc(g}d}d}|D]}|d\}}d}d}	i}
i}|ddD]\}}
|j}||vs||vr|}||vr|
d}
||
vr-|dk(r!|
td	d}	nw|
j}
|d
k(r|r[|
tdi|dk(rd}	t|
}
d
}|j|
z}
||vs||vr|
|dvrtd|zd}	n
|
|
|<|
||<|	r|j|||
|f|S#t$rtd
d}	Y5wxYw)aReturn 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.

        )rr)rrrrrrr
commenturlr
Fr%NTrz%   missing value for domain attributerzM   missing or invalid value for expires attribute: treating as session cookierz?   missing or invalid (non-numeric) value for max-age attribute)rrrz!   missing value for %s attribute)rorrdrprr)r	attrs_set
cookie_tuples
boolean_attrsvalue_attrscookie_attrsrrmax_age_set
bad_cookiestandardrrrrs               r_normalized_cookie_tuplesz#CookieJar._normalized_cookie_tuplesms
+
0
&H	@L&q/KD% KJHD$QR(2
 1WWY$m(;A
%!)A==yFG%)
	A	>" y FG 	>"&KF"A		A
A$!}*<	!BBBQFG%)
"#HQKDGe2
 h  $x!>?QH	@T5& 23%)
	sC77DDcR|\}}}}|jdt}|jdt}|jdt}	|jdt}
|jdd}|	t|}|jdd}|jdd}
|jd	d}|jd
d}|tur|dk7rd}t	|}nFd}t|}|j
d
}|dk7r|dk(r|d|}n|d|dz}t|dk(rd
}|tu}d}|rt|jd}|turt|\}}|}n|jdsd|z}d}|	tur(|	t|}	nd}tjdd|	}	nd}	|
turd}
d}
n2|
|jkr#	|j|||t#d|||yt%||||	||||||||
|
|||S#t$rYywxYw#t $rYCwxYw)NrrrrrrFrrrrTrrr
r%rz\s+z2Expiring cookie, domain='%s', path='%s', name='%s')r%rrdrprrrrboolrrrrrrclearKeyErrorrr)rtuprrrrrrrrrrrrrrrrrrrrrs                       r_cookie_from_cookie_tuplez#CookieJar._cookie_from_cookie_tuplesv'*#eXth/||FF+||FF+,,y&1,,y$/
g,h.,,y%0,,y$/ll<6v$"*!Nt$D"N(D

3ABwa<8D1:D4yA~ct"/"!%f&7&7&<!=V-g6NHdF""3'ZFv|$G,!%vvfb$/DfGG
		
!


64.
G4
'gEN.0BN!

	C

v

s$5HH	HH	H&%H&c|j|}g}|D](}|j||}|s|j|*|Sr!)rrr)rrrrrrrDs       r_cookies_from_attrs_setz!CookieJar._cookies_from_attrs_set*sM66yA
 	.C33CAFw~~f-	.rct|jdd}||jj}|D]#}|jdk(sd|_|sd|_%y)NrTr%Tr
)r6rrSrr)rr
rfc2109_as_nsrDs    r_process_rfc2109_cookiesz"CookieJar._process_rfc2109_cookies3s[.CTJ
  $ 4 44M	'F~~"!% &'FN
	'rc|j}|jdg}|jdg}ttjx|j_|_|jj}|jj}|s|r|s|r|s|r|s|sgS	|jt||}|r|r	|jt||}	|j|	|r@i}
|D](}d|
|j|j|j f<*|
fd}t#||	}	|	r|j%|	|S#t$rtg}YwxYw#t$rtg}	YwxYw)zAReturn sequence of Cookie objects extracted from response object.zSet-Cookie2z
Set-CookieNcP|j|j|jf}||vSr!)rrr)	ns_cookielookuprs   rno_matching_rfc2965z3CookieJar.make_cookies.<locals>.no_matching_rfc2965ls'#**INNINNJCf,,r)rget_allrdrqrrrSrRr
r	Exceptionr"rr
rrrfilterr)
rresponserrrfc2965_hdrsns_hdrsrSrRr
ns_cookiesrrDrs
             rmake_cookieszCookieJar.make_cookies?sw--/}b9//,3(+DIIK(88DI,,&&<<((gh'I	22"<0';Gx
 !99$W-w8


))*5%MFHLFFMM6;;DEM;A-$$7D
z*C	%'G	
 )+

 s$'E
E%
E"!E"%E=<E=cl|jj	ttjx|j_|_|jj
||r|j||jjy#|jjwxYw)z-Set a cookie if policy says it's OK to do so.N)	rrrdrqrrrE
set_cookierrCs   rset_cookie_if_okzCookieJar.set_cookie_if_okvs~""$	),/		,<<DLL	||""673'
&&(D&&(sA BB3c|j}|jj	|j|vri||j<||j}|j|vri||j<||j}|||j
<|jj
y#|jj
wxYw)z?Set a cookie, without checking whether or not it should be set.N)rrrrrrr)rrDcc2c3s     rrzCookieJar.set_cookiesMM""$	)}}A%"q'76==!B{{"$boFKKB$Bv{{O&&(D&&(sA'B**Cctd|j|jj	|j	||D]<}|j
j
||s td||j|>	|jjy#|jjwxYw)zAExtract cookies from response, where allowable given the request.zextract_cookies: %sz setting cookie: %sN)	rrrrrrrErr)rrrrDs    rextract_cookieszCookieJar.extract_cookiess$hmmo6""$	)++Hg>
,<<&&vw70&9OOF+
,

&&(D&&(s1B#(B##B?c|#||td|j|||=y||td|j||=y||j|=yi|_y)aClear 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.

        Nz8domain and path must be given to remove a cookie by namez.domain must be given to remove cookies by path)rpr)rrrrs    rrzCookieJar.clearsDL NPP

f%d+D1

~ DFF

f%d+



f%DMrc8|jj	|D]@}|js|j|j|j
|jB	|jjy#|jjwxYw)zDiscard 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.

        N)rrrrrrrr)rrDs  rclear_session_cookieszCookieJar.clear_session_cookiessv	
""$	)
H>>JJv}}fkk6;;G
H
&&(D&&(sA=3A==Bcj|jj	tj}|D]E}|j|s|j	|j
|j|jG	|jjy#|jjwxYw)aDiscard 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).

        N)	rrrqr,rrrrr)rrKrDs   rrzCookieJar.clear_expired_cookiess	
""$	)))+C
H$$S)JJv}}fkk6;;G
H
&&(D&&(s*B3BB2c,t|jSr!)rrrcs r__iter__zCookieJar.__iter__s$--((rc"d}|D]}|dz}	|S)z#Return number of contained cookies.r
r%r>)rrrDs   r__len__zCookieJar.__len__s
%FAA%rcg}|D]}|jt|d|jjddj	|dSN<[rz]>)rr7r8r9rrrrDs   rr:zCookieJar.__repr__s>2FAHHT&\22!^^44diilCCrcg}|D]}|jt|d|jjddj	|dSr-)rrr8r9rr0s   rr2zCookieJar.__str__s>1FAHHS[11!^^44diilCCrr!)NNN)"r9r;r<r=rcompilerrstrict_domain_re	domain_redots_reASCIImagic_rerrrrrrrrr
r
rrrr#rr&rr)r+r:r2r>rrrrs"**U#Krzz+&H!rzz+.

8$Ibjj!Grzz6AH$9v%B_BZx
'5n))
)6
))&)D
DrrceZdZy)rNrr>rrrrrrrc4eZdZdZddZddZddZ		ddZy)	rz6CookieJar that can be loaded from and saved to a file.Nctj|||tj|}||_t||_y)z}
        Cookies are NOT loaded from the named file until either the .load() or
        .revert() method is called.

        N)rrosfspathfilenamer	delayload)rr>r?rs    rrzFileCookieJar.__init__s:	4(yy*H 
irct)zSave cookies to a file.rA)rr>ignore_discardignore_expiress    rsavezFileCookieJar.saverHrc|(|j
|j}nttt|5}|j	||||dddy#1swYyxYw)zLoad cookies from a file.N)r>rpMISSING_FILENAME_TEXTopen_really_loadrr>rArBr s     rloadzFileCookieJar.loads\}}(T]]("#899
(^	Kqa>>J	K	K	KsAAc|(|j
|j}ntt|jj		tj|j}i|_	|j|||	|jjy#t$r	||_wxYw#|jjwxYw)zClear all cookies and reload cookies from a saved file.

        Raises LoadError (or OSError) if reversion is not successful; the
        object's state will not be altered if this happens.

        N)r>rprErrrdeepcopyrrIOSErrorr)rr>rArB	old_states     rrevertzFileCookieJar.reverts}}(T]]("#899""$	)

dmm4IDM
		(NNC
&&(
 )



&&(s&B1-BB..B11C
)NFNNFF)r9r;r<r=rrCrIrNr>rrrrs"@
)$K#49)rrc|j|jfd|jfd|jfg}|j|jd|jf|jr|jd|jr|jd|jr|jd|jr|jd|jr/|jdtt|jf|jr|jd	|jr|jd
|jf|jr|jd|jft!|j"j%}|D]+}|j|t'|j"|f-|jdt'|j(ft+|gS)
zReturn string representation of Cookie in the LWP cookie file format.

    Actually, the format is extended a bit -- see module docstring.

    rrr)	path_specN)	port_specN)
domain_dotN)rNr)rNrrr)rrrrrrrrrrrrTrrrrsortedrrrrr)rDrrrs    rlwp_cookie_strrU's++v||	$
&++	
FMM	"	$A{{&&++)> ?
ahh':;
ahh':;
  !((+?"@
}}ahh/0
~~qxx(v~~)>?!AB
~~qxx 12
~~qxxFNN ;<
188\63E3E$FG&,,##%&D
,	!Sa)*+,HHiV^^,
-.aS!!rc&eZdZdZddZddZdZy)ra[
    The LWPCookieJar saves a sequence of "Set-Cookie3" lines.
    "Set-Cookie3" is the format used by the libwww-perl library, not known
    to be compatible with any browser, but which is easy to read and
    doesn't lose information about RFC 2965 cookies.

    Additional methods

    as_lwp_str(ignore_discard=True, ignore_expired=True)

    ctj}g}|D]B}|s
|jr|s|j|r&|jdt	|zDdj|dgzS)zReturn cookies as a string of "\n"-separated "Set-Cookie3" headers.

        ignore_discard and ignore_expires: see docstring for FileCookieJar.save

        zSet-Cookie3: %s
r)rqrr,rrUr)rrArBrKr1rDs      r
as_lwp_strzLWPCookieJar.as_lwp_strPsriik	AF!fnn!f&7&7&<
HH&)??@	AyyB4  rNc|(|j
|j}ntttjtj
|tjtjztjzdd5}|jd|j|j||dddy#1swYyxYw)Nwz#LWP-Cookies-2.0
)r>rprEr<fdopenrFO_CREATO_WRONLYO_TRUNCwriterYrHs     rrCzLWPCookieJar.save`s}}(T]]("#899
YYGGHbjj2;;6CUK
	E
GG()
GGDOONNCD	E	E	Es3CCcJ|j}|jj|sd|z}t|t	j}d}d}	d}
	|jx}dk7r|j|s(|t
|dj}t|gD]0}|d\}
}i}i}|	D]}d||<	|ddD]A\}}||j}nd}||
vs||	vr|}||	vr
|d	}|||<3||
vr|||<=|||<C|j}|d
}|d}|t|}|d	}|d}|jd
}t|d|
||d|d|||d|d|d|d|||d|d|}|s|jr|s|j|r |j|3|jx}dk7ryy#t $rt"$rt%td|dwxYw)Nz5%r does not look like a Set-Cookie3 (LWP) format filezSet-Cookie3:)rRrQrSrr)rrrrrrrrr
Fr%TrrrrrrrRrSrrQrrrz invalid Set-Cookie3 format file : )readliner8rcrrqrrrrror%rrrr,rrLrr")rr r>rArBmagicr!rKheaderrrlinedatarrrrrrrrrrrrrs                          rrGzLWPCookieJar._really_loadosu

}}##E*$%CC. iik.
0
9	.::<'4B.v.CKL)//1.v6-'D"&q'KD%!HD*,&+, $QR(1=!"B!%B+-23F "A
- yd!*+HQK+-*+HQK&'DG( !A	lG	lG*"*7"3"&x[F'-'8'8'=$q|T5 y!K.%'7< y!K. {&& | #	%A*aii )all3.? OOA&[-'::<'4B.f		.%'%t-.
.	.s
FG44.H")TTrO)r9r;r<r=rYrCrGr>rrrrCs
! 
EJ.rrceZdZdZdZddZy)r	a

    WARNING: you may want to backup your browser's cookies file if you use
    this class to save cookies.  I *think* it works, but there have been
    bugs in the past!

    This class differs from CookieJar only in the format it uses to save and
    load cookies to and from a file.  This class uses the Mozilla/Netscape
    `cookies.txt' format.  curl and lynx use this file format, too.

    Don't expect cookies saved while the browser is running to be noticed by
    the browser (in fact, Mozilla on unix will overwrite your saved cookies if
    you change them on disk while it's running; on Windows, you probably can't
    save at all while the browser is running).

    Note that the Mozilla/Netscape format will downgrade RFC2965 cookies to
    Netscape cookies on saving.

    In particular, the cookie version and port number information is lost,
    together with information about whether or not Path, Port and Discard were
    specified by the Set-Cookie2 (or Set-Cookie) header, and whether or not the
    domain as set in the HTTP header started with a dot (yes, I'm aware some
    domains in Netscape files start with a dot and some don't -- trust me, you
    really don't want to know any more about this).

    Note that though Mozilla and Netscape use the same format, they use
    slightly different headers.  The class saves cookies using the Netscape
    header by default (Mozilla can cope with that).

    cttj}tj|jst	d|z	|jx}dk7r+i}|jtrd|t<|ttd}|jdr|dd}|jjds|jdk(r|jd\}}	}
}}}
}|dk(}|	dk(}	|
dk(r|}
d}|jd}d	}|dk(rd}d
}td|
|dd	||	||
d	|||dd|}|s|jr|s|j|r|j||jx}dk7r*yy#t $rt"$rt%t	d|d
wxYw)Nz4%r does not look like a Netscape format cookies filerrXr)#r	TRUErFTr
z%invalid Netscape format cookies file rc)rqNETSCAPE_MAGIC_RGXrrdrrHTTPONLY_PREFIX
HTTPONLY_ATTRrrrrrrr,rrLrr")rr r>rArBrKrgrrrrrrrrrrrs                  rrGzMozillaCookieJar._really_loadsiik!''

5F
<	.::<'4B.
???3*,D'O 4 56D==&tCRyJJL++J7JJLB&

4(M($u F*$4$> 2:!D E$//4 b="G"G1dE!#3[!""	!&!))%!,,s*;"i::<'4B.l		.%'%t-.
.	.s
D>F		.F7Nc
|(|j
|j}ntttjtj
|tjtjztjzdd5}|jttj}|D]}|j}|s
|jr|s|j|r3|jrd}nd}|j!drd}	nd}	|j"t%|j"}
nd}
|j&d}|j(}n|j(}|j&}|j+t,r	t.|z}|jdj1||	|j2||
||gdz	dddy#1swYyxYw)	Nr[r\rmFALSErrrlrX)r>rprEr<r]rFr^r_r`raNETSCAPE_HEADER_TEXTrqrrr,rrrrrrr#rprorr)
rr>rArBr rKrDrrrrrrs
             rrCzMozillaCookieJar.save"s}}(T]]("#899
YYGGHbjj2;;6CUK
"	
GG()))+C
%&..%&*;*;C*@==6&&f$$S);$+k>>-!&..1G G<<'D"KKE!;;D"LLE..}=,v5FIIv{FKK%we=>3

"	"	"	s
D2GGrO)r9r;r<r=rGrCr>rrr	r	s>D.L'rr	r!)Yr=__all__r<rrJrrqurllib.parserurllib.request	threadingrhttp.clienthttpcalendarrr
rrrprorclient	HTTP_PORTrr3rnrErsr"r+r3rVrXrormrTrYrar7rbrhr{rIrXrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
rrrrrrrrLrrrUrr	)r.s0r<module>rs6M
	#
	

--.RZZ @A:A
9
4+12%
2B&0(T=	bjj5rxx@6
p,-/XX7RZZ2BDD288OE
RZZ&
DD288O)*65pbjj
 44"))#$5B3
$$67#$MN#$9:2::h'Sj#

;/2AH"**Y
)
%N(bjj288, 	 $"**9:+!
F"_E_EDB_,_B"LDLD`4)I4)n"8v.=v.rM}MA;3sJ0