Your IP : 13.59.36.4


Current Path : /opt/alt/python312/lib64/python3.12/http/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/http/__pycache__/cookiejar.cpython-312.opt-2.pyc

�

�Q�f~.��h�	gd�ZddlZddlZddlZddlZddlZddlZddlZddl	Z
ddlZddl
mZdZdad�ZdZdZeej*j,�Zej0d�Zd	Zd
Zd�ZdZd
�Zgd�Zgd�Z e D�cgc]}|jC���c}Z"dJd�Z#dJd�Z$ddddd�Z%ej0dejL�Z'd�Z(d�Z)ej0dejL�Z*ej0dejVejLz�Z,ej0dejZejLz�Z.d�Z/ej0dejZejLz�Z0d�Z1d�Z2ej0d�Z3ej0d�Z4ej0d�Z5ej0d �Z6d!�Z7ej0d"�Z8d#�Z9d$�Z:d%�Z;ej0d&ejL�Z<d'�Z=d(�Z>d)�Z?d*�Z@ej0d+ejL�ZAd,�ZBd-�ZCd.�ZDd/�ZEd0ZFej0d1�ZGd2�ZHd3�ZId4�ZJd5�ZKGd6�d7�ZLGd8�d9�ZMGd:�d;eM�ZNd<�ZOGd=�d>�ZPGd?�d@�ZQGdA�dBeR�ZSGdC�dDeQ�ZTdE�ZUGdF�dGeT�ZVGdH�dIeT�ZWycc}w)K)�Cookie�	CookieJar�CookiePolicy�DefaultCookiePolicy�
FileCookieJar�LWPCookieJar�	LoadError�MozillaCookieJar�N)�timegmFc�j�tsytsddl}|jd�atj|�S)Nr
zhttp.cookiejar)�debug�logger�logging�	getLogger)�argsrs  �5/opt/alt/python312/lib64/python3.12/http/cookiejar.py�_debugr,s.�������"�"�#3�4���<�<�����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.

c��ddl}ddl}ddl}|j�}|j	d|�|j�}|j
d|zd��y)Nr
zhttp.cookiejar bug!
%s�)�
stacklevel)�io�warnings�	traceback�StringIO�	print_exc�getvalue�warn)rrr�f�msgs     r�_warn_unhandled_exceptionr"BsF��#�"�
���
�A�
����a� �
�*�*�,�C��M�M�+�c�1�a�M�@ri�c���|dd\}}}}}}|tk\rPd|cxkrdkrEnyd|cxkrdkr7nyd|cxkrdkr)nyd|cxkrdkrnyd|cxkrdkr
t|�Syy)	N����r
��;�=)�
EPOCH_YEARr)�tt�year�month�mday�hour�min�secs       r�_timegmr3Qs���(*�2�A��%�D�%��t�S�#�	
��	�!�u�"2��"2��	:;�d��b���
�d��b��� !�C�~�2�~��56��N��N��b�z��5C�r)�Mon�Tue�Wed�Thu�Fri�Sat�Sun)�Jan�Feb�Mar�Apr�May�Jun�Jul�Aug�Sep�Oct�Nov�Decc�R�	|�/tjjtj��}n/tjj|tj��}d|j|j
|j|j|j|jfzS)N��tzz%04d-%02d-%02d %02d:%02d:%02dZ)
�datetime�now�UTC�
fromtimestampr-r.�dayr0�minute�second��t�dts  r�	time2isozrT^s���
�	�y�
�
�
�
"�
"�h�l�l�
"�
3��
�
�
�
,�
,�Q�8�<�<�
,�
@��+�
������2�6�6�2�7�7�B�I�I�r�y�y�/B�B�Brc��	|�/tjjtj��}n/tjj|tj��}dt|j�|jt|jdz
|j|j|j|jfzS)NrHz#%s, %02d-%s-%04d %02d:%02d:%02d GMTr%)
rJrKrLrM�DAYS�weekdayrN�MONTHSr.r-r0rOrPrQs  r�
time2netscaperYqs���	�	�y�
�
�
�
"�
"�h�l�l�
"�
3��
�
�
�
,�
,�Q�8�<�<�
,�
@��0��R�Z�Z�\��B�F�F�F�2�8�8�A�:�$6�
������"�)�)�R�Y�Y�40�0�0r)�GMTrL�UT�Zz^([-+])?(\d\d?):?(\d\d)?$c��d}|tvrd}|Stj|�}|redt|j	d��z}|j	d�r |dt|j	d��zz}|j	d�dk(r|}|S)Nr
ir��<r%�-)�	UTC_ZONES�TIMEZONE_RE�search�int�group)rI�offset�ms   r�offset_from_tz_stringrh�s���
�F�	�Y�����M�
���r�"����C�����
�O�+�F��w�w�q�z��"�s�1�7�7�1�:��"6�6���w�w�q�z�S� � ����Mrc	��t|�}|tjkDry	tj	|j��dz}|�d}|�d}|�d}t|�}t|�}t|�}t|�}|dkr\tjtj��d}|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|}nYyY��wxYw)Nr%r&r
i��d�2rL)
rdrJ�MAXYEAR�MONTHS_LOWER�index�lower�
ValueError�time�	localtime�absr3�upperrh)
rN�mon�yr�hrr1r2rI�imon�cur_yrrg�tmprRrfs
             r�	_str2timer{�s���	�R��B�	�H������� � �����-�a�/��
�z��2�
�{�!�C�
�{�!�C�

�c�(�C�	�R��B�

�c�(�C�

�c�(�C�	�D�y�����	�	��,�Q�/���S�L����
�&�[�1�_��
��G���q�6�B�;��1�u�2��8�b��C�x�"�	��S�#�r�3��R�0�1�A��}�
�:��B�
�X�X�Z��&�r�*���>��
��J���H��[�	�	��s�8�D���	��	����?��?���C��
�	�s;�&D�	E�'D3�2E�3	E�<E�?E�E�E�EzV^[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	�0�	tj|�}|r�|j�}tj	|dj��dz}t
|d�|t
|d�t
|d�t
|d�t|d�f}t|�S|j�}tjd|d�}dgdz\}}}}}}	}
tj|�}|�|j�\}}}}}}	}
nyt||||||	|
�S)	Nr%rr
r^����)�STRICT_DATE_RErc�groupsrmrnrord�floatr3�lstrip�
WEEKDAY_RE�sub�LOOSE_HTTP_DATE_REr{)�textrg�grur,rNrvrwr1r2rIs           r�	http2timer��s���:	���d�#�A��
�H�H�J��� � ��1�����.��2���!�A�$�i��c�!�A�$�i��!�A�$�i��Q�q�T��E�!�A�$�K�1���r�{��
�;�;�=�D��>�>�"�d�A�&�D�'+�V�A�X�"�C��b�"�c�3��	�!�!�$�'�A��}�)*����&��S�"�b�#�s�B���S�#�r�2�s�C��4�4ra�^
    (\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)Nr�)r��ISO_DATE_RErcr�r{)
r�rNrurvrwr1r2rIrg�_s
          r�iso2timer�2s��
��;�;�=�D�'+�V�A�X�"�C��b�"�c�3��	���4� �A��}�-.�H�H�J�)��C��b�#�s�B����S�#�r�2�s�C��4�4rc�j�	|jd�\}}|jd||j|dzS)Nr
)�span�string)�match�start�ends   r�	unmatchedr�Ss7��3����A��J�E�3��<�<�������S�T� 2�2�2rz^\s*([^=\s;,]+)z&^\s*=\s*\"([^\"\\]*(?:\\.[^\"\\]*)*)\"z^\s*=\s*([^\s;,]*)z\\(.)c���	g}|D�]^}|}g}|�r?tj|�}|r�t|�}|jd�}tj|�}|r3t|�}|jd�}t
j
d|�}nFtj|�}|r-t|�}|jd�}|j�}nd}|j||f�nd|j�jd�r)|j�dd}|r|j|�g}ntjdd|�\}}	|}|r��?|s��N|j|���a|S)Nr%z\1�,z^[=\s;]*r)�HEADER_TOKEN_RErcr�re�HEADER_QUOTED_VALUE_RE�HEADER_ESCAPE_REr��HEADER_VALUE_RE�rstrip�appendr��
startswith�re�subn)
�
header_values�resultr��	orig_text�pairsrg�name�value�non_junk�
nr_junk_charss
          r�split_header_wordsr�\sM��+�Z�F����	�����&�&�t�,�A�� ��|���w�w�q�z��*�1�1�$�7���$�Q�<�D��G�G�A�J�E�,�0�0���>�E�'�.�.�t�4�A��(��|�� !����
�� %�����!%�����d�E�]�+�����)�)�#�.��{�{�}�Q�R�(���&�-�-��.���+-�'�'�+�r�4�*H�'��-� ��?�@�&�-�-��&�G�H�Mr�([\"\\])c�,�	g}|D]|}g}|D]P\}}|�8tjd|�stjd|�}d|z}|�d|��}|j	|��R|s�]|j	dj|���~dj|�S)Nz^\w+$�\\\1z"%s"�=�; �, )r�rc�HEADER_JOIN_ESCAPE_REr�r��join)�lists�headersr��attr�k�vs      r�join_header_wordsr��s���
��G������D�A�q��}��y�y��1�-�-�1�1�'�1�=�A���
�A� �!�$���K�K��N�
������	�	�$��0���9�9�W��rc�^�|jd�r|dd}|jd�r|dd}|S)N�"r%���)r��endswith�r�s r�strip_quotesr��s5�����s���A�B�x���}�}�S���C�R�y���Krc��	d}g}|D�]}g}d}t|jd��D]�\}}|j�}|jd�\}}	}
|j�}|s|dk(rnu�E|	r|
j�nd}
|dk7rF|j	�}||vr|}|dk(r|
�t|
�}
d}n|dk(r|
�t
t|
��}
|j||
f���|s��|s|jd	�|j|���|S)
N)�expires�domain�path�secure�version�port�max-ageF�;r�r
r�Tr�)r��0)�	enumerate�split�strip�	partitionror�r�r�)�
ns_headers�known_attrsr��	ns_headerr��version_set�ii�param�key�sep�val�lcs            r�parse_ns_headersr��s$��
�1�K��F��	�����#�9�?�?�3�#7�8�I�B���K�K�M�E�!�O�O�C�0�M�C��c��)�)�+�C����7���"%�#�)�)�+�$�C��Q�w��Y�Y�[����$��C��)�#���*�3�/��"&�K��I�%���'��S�(9�:���L�L�#�s��$�=9�@�����-�.��M�M�%� �W �Z�Mrz\.\d+$c�`�	tj|�ry|dk(ry|ddk(s|ddk(ryy)NFrr
�.r�T��IPV4_RErcr�s r�is_HDNr�s;��4��~�~�d����r�z���A�w�#�~��b��S���rc���	|j�}|j�}||k(ryt|�sy|j|�}|dk(s|dk(ry|jd�syt|dd�syy)NTFr�r
r�r%)ror��rfindr�)�A�B�is   r�domain_matchr�&sr���,	
���	�A�	���	�A��A�v���!�9��	����
�A��B�w�!�q�&���<�<�����!�A�B�%�=��rc�2�	tj|�ryy�NFTr�r�s r�liberal_is_HDNr�Ms���
�~�~�d���rc���	|j�}|j�}t|�rt|�s||k(ryy|jd�}|r|j|�ry|s||k(ryy)NTFr�)ror�r�r�)r�r��initial_dots   r�user_domain_matchr�Wsh���
	
���	�A�	���	�A��1��.��"3���6����,�,�s�#�K��q�z�z�!�}���1��6��rz:\d+$c���	|j�}tjj|�d}|dk(r|j	dd�}t
j
d|d�}|j�S)Nr%r�Host)�get_full_url�urllib�parse�urlparse�
get_header�cut_port_rer�ro)�request�url�hosts   r�request_hostr�lsi����
�
�
 �C��<�<� � ��%�a�(�D��r�z��!�!�&�"�-���?�?�2�t�Q�'�D��:�:�<�rc�8�	t|�x}}d|vr|dz}||fS)Nr��.local)r�)r��erhn�req_hosts   r�eff_request_hostr�|s4���
#�7�+�+�D�8�
�(���(�"���T�>�rc��	|j�}tjj|�}t	|j
�}|j
d�sd|z}|S)N�/)r�r�r��urlsplit�escape_pathr�r�)r�r��partsr�s    r�request_pathr��sO��@�
�
�
�
 �C��L�L�!�!�#�&�E��u�z�z�"�D��?�?�3���T�z���Krc��|j}|jd�}|dk\r||dzd}	t|�|St
}|S#t$rt	d|�YywxYw)N�:r
r%znonnumeric port: '%s')r��findrdrpr�DEFAULT_HTTP_PORT)r�r�r�r�s    r�request_portr�sl���<�<�D��	�	�#��A��A�v��A�a�C�D�z��	���I��K�!���K���	��*�D�1��	�s�A�A�Az%/;:@&=+$,!~*'()z%([0-9a-fA-F][0-9a-fA-F])c�F�d|jd�j�zS)Nz%%%sr%)rert)r�s r�uppercase_escaped_charr�s���E�K�K��N�(�(�*�*�*rc��	tjj|t�}tjt|�}|S�N)r�r��quote�HTTP_PATH_SAFE�ESCAPED_CHAR_REr�r)r�s rr�r��s5��O��<�<���d�N�3�D����5�t�<�D��Krc��	|jd�}|dk\r3||dzd}|jd�}t|�r|dk\s|dk(rd|zS|S)Nr�r
r%�local)rr�)�hr��bs   r�reachr�sZ���2	
���s��A��A�v�
�a��c�d�G��
�F�F�3�K���!�9�!�q�&�A��L��q�5�L��Hrc�\�	t|�}t|t|j��syy�NTF)r�r�r�origin_req_host)r�r�s  r�is_third_partyr�s.����G�$�H���%��(?�(?�"@�A��rc�@�eZdZ		d	d�Zd�Zd
d�Zd�Zd
d�Zd�Zd�Z	y)rc��|�t|�}|�tt|��}|�|durtd��||_||_||_||_||_|j�|_	||_
||_|	|_|
|_
||_||_|
|_||_||_||_t)j(|�|_y)NTz-if port is None, port_specified must be false)rdr�rpr�r�r�r��port_specifiedror��domain_specified�domain_initial_dotr��path_specifiedr�r��discard�comment�comment_url�rfc2109�copy�_rest)�selfr�r�r�r�rr�rrr�rr�r�rrr�restrs                  r�__init__zCookie.__init__�s�����#�g�,����#�e�G�n�*=���<�N�d�2��L�M�M������	���
���	�,����l�l�n��� 0���
#5�����	�,���������������&�������Y�Y�t�_��
rc��||jvSr�r)r r�s  r�has_nonstandard_attrzCookie.has_nonstandard_attr#s���t�z�z�!�!rNc�:�|jj||�Sr)r�get)r r��defaults   r�get_nonstandard_attrzCookie.get_nonstandard_attr%s���z�z�~�~�d�G�,�,rc�"�||j|<yrr$)r r�r�s   r�set_nonstandard_attrzCookie.set_nonstandard_attr's�� ��
�
�4�rc�h�|�tj�}|j�|j|kryyr)rqr�)r rKs  r�
is_expiredzCookie.is_expired*s,���;�d�i�i�k���L�L�$�4�<�<�3�+>��rc���|j�d}nd|jz}|j|z|jz}|j�|j�d|j��}n|j}d|�d|�d�S)Nrrr�z<Cookie z for �>)r�r�r�r�r�)r �p�limit�	namevalues    r�__str__zCookie.__str__0sd���9�9��"�a��d�i�i�-�a����a��$�)�)�+���:�:�!�#'�9�9�d�j�j�9�I��	�	�I��'0�%�8�8rc�\�g}dD]-}t||�}|j|�dt|�����/|jdt|j�z�|jdt|j�z�|j
j�ddj|��d�S)N)r�r�r�r�rr�rrr�rr�r�rrrr�zrest=%sz
rfc2109=%s�(r��))�getattrr��reprrr�	__class__�__name__r�)r rr�r�s    r�__repr__zCookie.__repr__:s������D��4��&�D��K�K�4��d��4�5��	
���I��T�Z�Z� 0�0�1����L�4����#5�5�6��>�>�2�2�D�I�I�d�O�D�Dr)Fr)
r:�
__module__�__qualname__r"r%r)r+r-r3r;�rrrr�s1���6�(%�T"�-�!��9�Errc�&�eZdZ	d�Zd�Zd�Zd�Zy)rc��	t��r��NotImplementedError�r �cookier�s   r�set_okzCookiePolicy.set_okRs��	�"�#�#rc��	t��rrArCs   r�	return_okzCookiePolicy.return_ok[s��O�!�#�#rc��	y�NTr>)r r�r�s   r�domain_return_okzCookiePolicy.domain_return_ok_�
��	�rc��	yrIr>)r r�r�s   r�path_return_okzCookiePolicy.path_return_okdrKrN)r:r<r=rErGrJrMr>rrrrIs���$�$��
rrc
���eZdZ	dZdZdZdZeezZdddddddddedddf
d	�Zd
�Z	d�Z
d�Zd
�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy) rr%rr}r
NTF)�https�wssc��	||_||_||_||_||_||_|	|_|
|_||_||_	|
|_
|�t|�|_nd|_|�t|�}||_
y)Nr>)�netscape�rfc2965�rfc2109_as_netscape�hide_cookie2�
strict_domain�strict_rfc2965_unverifiable�strict_ns_unverifiable�strict_ns_domain�strict_ns_set_initial_dollar�strict_ns_set_path�secure_protocols�tuple�_blocked_domains�_allowed_domains)r �blocked_domains�allowed_domainsrRrSrTrUrVrWrXrYrZr[r\s              rr"zDefaultCookiePolicy.__init__ts���	P� ��
����#6�� �(���*���+F��(�&<��#� 0���,H��)�"4��� 0����&�$)�/�$:�D�!�$&�D�!��&�#�O�4�O� /��rc��	|jSr)r^�r s rr`z#DefaultCookiePolicy.blocked_domains�s��B��$�$�$rc�&�	t|�|_yr)r]r^)r r`s  r�set_blocked_domainsz'DefaultCookiePolicy.set_blocked_domains�s��2� %�o� 6��rc�B�|jD]}t||�s�yyr)r^r�)r r��blocked_domains   r�
is_blockedzDefaultCookiePolicy.is_blocked�s$��"�3�3�N� ���8��4�rc��	|jSr)r_rcs rraz#DefaultCookiePolicy.allowed_domains�s��K��$�$�$rc�.�	|�t|�}||_yr)r]r_)r ras  r�set_allowed_domainsz'DefaultCookiePolicy.set_allowed_domains�s��;��&�#�O�4�O� /��rc�\�|j�y|jD]}t||�s�yyr�)r_r�)r r��allowed_domains   r�is_not_allowedz"DefaultCookiePolicy.is_not_allowed�s3��� � �(��"�3�3�N� ���8��4�rc��	td|j|j�dD]}d|z}t||�}|||�r�yy)N� - checking cookie %s=%s)r��
verifiabilityr�r�r�r��set_ok_FT�rr�r�r7�r rDr��n�fn_name�fns      rrEzDefaultCookiePolicy.set_ok�sS��	�	�)�6�;�;����E�N�A���k�G���w�'�B��f�g�&��	N�rc��|j�"td|j|j�y|jdkDr|jstd�y|jdk(r|j
std�yy)Nz0   Set-Cookie2 without version attribute (%s=%s)Fr
�$   RFC 2965 cookies are switched off�$   Netscape cookies are switched offT)r�rr�r�rSrRrCs   r�set_ok_versionz"DefaultCookiePolicy.set_ok_version�sh���>�>�!�
�E��;�;����
.���>�>�A��d�l�l��9�:��
�^�^�q�
 �����9�:��rc���|jrYt|�rN|jdkDr|jrt	d�y|jdk(r|j
rt	d�yy�Nr
z>   third-party RFC 2965 cookie during unverifiable transactionFz>   third-party Netscape cookie during unverifiable transactionT��unverifiablerr�rWrrXrCs   r�set_ok_verifiabilityz(DefaultCookiePolicy.set_ok_verifiability�s]�����N�7�$;��~�~��!�d�&F�&F��8�9�����1�$��)D�)D��8�9��rc��|jdk(r>|jr2|jjd�rt	d|j�yy)Nr
�$z'   illegal name (starts with '$'): '%s'FT)r�rZr�r�rrCs   r�set_ok_namezDefaultCookiePolicy.set_ok_name�s?��
�N�N�a��D�$E�$E��K�K�"�"�3�'��<�f�k�k�J��rc���|jrit|�}|jdkDs|jdk(r@|jr4|j	|j
|�st
d|j
|�yy)Nr
z7   path attribute %s is not a prefix of request path %sFT)rr�r�r[rMr�r)r rDr��req_paths    r�set_ok_pathzDefaultCookiePolicy.set_ok_path�se��� � �#�G�,�H����!�#��.�.�A�%�$�*A�*A��'�'����W�=��!�"(�+�+�x�9��rc���|j|j�rtd|j�y|j|j�rtd|j�y|j�rt|�\}}|j}|jrz|jd�dk\rf|jd�}|jdd|�}|dk(r=||dzd}||dz|}	|	j�dvrt|�dk(r
td	|�y|jd�r|dd}
n|}
|
jd�dk\}|s|jd
�s
td|�y|jdk(rX|j|�sG|j|
�d
��s3|jd�s"d|zj|�std||�y|jdkDs|j|j zrt#||�std
||�y|jdkDs|j|j$zrF|dt|�}|jd�dk\r#t&j)|�std||�yy)N�"   domain %s is in user block-listF�&   domain %s is not in user allow-listr�rr
r%)�co�ac�com�edu�org�net�gov�milrd�aero�biz�cat�coop�info�jobs�mobi�museumr��pro�travel�euz&   country-code second level domain %sr�z/   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)rhr�rrnrr�rV�countr�ro�lenr�rr�r�rY�DomainRFC2965Matchr��DomainStrictNoDotsr�rc)
r rDr�r�r�r�r��j�tld�sld�undotted_domain�
embedded_dots�host_prefixs
             r�
set_ok_domainz!DefaultCookiePolicy.set_ok_domain�sO���?�?�6�=�=�)��7����G�����v�}�}�-��;�V�]�]�K���"�"�-�g�6�N�H�d��]�]�F��!�!�v�|�|�C�'8�A�'=��L�L��%���L�L��a��+����6� ��1���,�C� ��1��Q�-�C��y�y�{�''�'�,/�s�8�q�=��G��P�$�� � ��%�"(���*��"(��,�1�1�#�6�!�;�M� ����x�)@��H�����~�~��"����v�.����/�):�&�'A�B�����-��d�(�,�,�V�4��?���)�!�����"��&�&��)@�)@�@�#�D�&�1�� �!%�v�/� �����"��&�&��)@�)@�@�&�}��V���5���$�$�S�)�Q�.����x�0��K�&��0� �rc� �|jrft|�}|�d}nt|�}|jj	d�D]}	t|�||k(s�ytd||j�yy#t$rtd|�YywxYw)N�80r�z   bad port %s (not numeric)Fz$   request port (%s) not found in %sT)rr�strr�r�rdrpr�r rDr��req_portr0s     r�set_ok_portzDefaultCookiePolicy.set_ok_port3s���� � �#�G�,�H������x�=���[�[�&�&�s�+��!���F���=��
�,��=�����.����"�!��9�1�=� �!�s�A4�4B
�B
c��	td|j|j�dD]}d|z}t||�}|||�r�yy)Nrp)r�rqr�r�r�r��
return_ok_FTrsrts      rrGzDefaultCookiePolicy.return_okHsP��	�	�)�6�;�;����E�R�A�"�1�n�G���w�'�B��f�g�&��	S�
rc��|jdkDr|jstd�y|jdk(r|jstd�yy)Nr
ryFrzT)r�rSrrRrCs   r�return_ok_versionz%DefaultCookiePolicy.return_ok_versionZsA���>�>�A��d�l�l��9�:��
�^�^�q�
 �����9�:��rc���|jrYt|�rN|jdkDr|jrt	d�y|jdk(r|j
rt	d�yyr}r~rCs   r�return_ok_verifiabilityz+DefaultCookiePolicy.return_ok_verifiabilitycs]�����N�7�$;��~�~��!�d�&F�&F��%�&�����1�$��)D�)D��%�&��rc�d�|jr$|j|jvrtd�yy)Nz(   secure cookie with non-secure requestFT)r��typer\rrCs   r�return_ok_securez$DefaultCookiePolicy.return_ok_secureos)���=�=�W�\�\��1F�1F�F��=�>��rc�R�|j|j�rtd�yy)Nz   cookie expiredFT)r-�_nowrrCs   r�return_ok_expiresz%DefaultCookiePolicy.return_ok_expiresus#�����T�Y�Y�'��&�'��rc��|jrNt|�}|�d}|jjd�D]	}||k(s�	ytd||j�yy)Nr�r�z0   request port %s does not match cookie port %sFT)r�rr�rr�s     r�return_ok_portz"DefaultCookiePolicy.return_ok_port{sb���;�;�#�G�,�H������[�[�&�&�s�+����=��
�,��I�����.��rc��t|�\}}|j}|r|jd�sd|z}n|}|jdk(r6|j|j
zr|js||k7rtd�y|jdkDrt||�std||�y|jdk(r"d|zj|�std||�yy)Nr�r
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)
r�r�r�r�rY�DomainStrictNonDomainrrr�r�)r rDr�r�r�r��	dotdomains       r�return_ok_domainz$DefaultCookiePolicy.return_ok_domain�s���)�'�2���$������&�+�+�C�0��f��I��I�
�N�N�a��
�
"�
"�T�%?�%?�
?��'�'�F�d�N��-�
.���>�>�A��l�4��&@��/�04�f�
>���>�>�Q���D��':�':�9�'E���!�6�
+��rc�l�t|�\}}|jd�sd|z}|jd�sd|z}|r|jd�sd|z}n|}|j|�s|j|�sy|j|�r
t	d|�y|j|�r
t	d|�yy)Nr�Fr�r�T)r�r�r�rhrrn)r r�r�r�r�r�s      rrJz$DefaultCookiePolicy.domain_return_ok�s���*�'�2���$��"�"�3�'��8�|�H����s�#��t�8�D��&�+�+�C�0��f��I��I��!�!�)�,��
�
�i�0H���?�?�6�"��7��@�����v�&��;�V�D��rc���td|�t|�}t|�}||k(ry|j|�r|j	d�s|||dzdk(rytd||�y)Nz- checking cookie path=%sTr�r%z  %s does not path-match %sF)rr�r�r�r�)r r�r�r��pathlens     rrMz"DefaultCookiePolicy.path_return_ok�sj���*�D�1���(���d�)���t����!�!�$�'��}�}�S�!�X�g�g�a�i�%@�C�%G���,�h��=�r)r:r<r=r�r�r��
DomainLiberal�DomainStrictr"r`rerhrarkrnrEr{r�r�r�r�r�rGr�r�r�r�r�r�rJrMr>rrrrjs���L��������M�%�&;�;�L�"&�t���%)�#�$�-1�(-�"/�.3�$)�"2�!0�F%�7��%�0���&
�
��	�:�x�*�$�
�����6�4rrc#��K�	t|j��D]-}d}	|jd}t|�Ed{���|r�*|���/y7�#t$rY�wxYw�wr�)�list�values�items�
deepvalues�AttributeError)�mapping�objs  rr�r��sd����3��G�N�N�$�%����	'��I�I��G�!�#��&�&���I�&�
'��	�	��	�s8� A�A�A�A�A�A�	A�A�A�Ac��eZdZy)�AbsentN�r:r<r=r>rrr�r����rr�c�~�eZdZ	ejd�Zejd�Zejd�Zejd�Zejd�Z	ejdej�Zdd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�Z y)rz\Wr�z\.?[^.]*z[^.]*z^\.+z^\#LWP-Cookies-(\d+\.\d+)Nc�j�|�
t�}||_tj�|_i|_yr)r�_policy�
_threading�RLock�
_cookies_lock�_cookies�r �policys  rr"zCookieJar.__init__�s.���>�(�*�F����'�-�-�/�����
rc��||_yr)r�r�s  r�
set_policyzCookieJar.set_policy�s	����rc��g}|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)	r�rJrr��keysrMr�rGr�)r r�r��cookies�cookies_by_pathr��cookies_by_namerDs        r�_cookies_for_domainzCookieJar._cookies_for_domain�s������|�|�,�,�V�W�=��I��2�F�;��-�-��/��#�(�(�*�D��<�<�.�.�t�W�=��-�d�3�O�)�0�0�2���|�|�-�-�f�g�>��4�5���(�)����v�&�3�	+��rc��	g}|jj�D]#}|j|j||���%|Sr)r�r��extendr�)r r�r�r�s    r�_cookies_for_requestzCookieJar._cookies_for_request
s?��@����m�m�(�(�*�F��N�N�4�3�3�F�G�D�E�+��rc��	|jd�d��d}g}|D�]�}|j}|sd}|dkDr|jd|z�|j�Q|jj|j�r,|dkDr'|jjd|j�}n|j}|j�|j|j�n |j|j�d|���|dkDs��|jr|jd	|jz�|jjd
�rB|j}|js|jd
�r|dd}|jd|z�|j���yd
}|jr|d|jzz}|j|����|S)Nc�,�t|j�Sr)r�r�)�as r�<lambda>z)CookieJar._cookie_attrs.<locals>.<lambda>s��3�q�v�v�;rT)r��reverseFr
z$Version=%sr�r�z
$Path="%s"r�r%z$Domain="%s"z$Portz="%s")�sortr�r�r��non_word_rerc�quote_rer�r�rr�r�r�rr�r)	r r�r��attrsrDr�r�r�r0s	         r�
_cookie_attrszCookieJar._cookie_attrss���	�	���.���=������F��n�n�G��"���Q�;��L�L���!8�9�
���)�� � �'�'����5�'�A�+��
�
�)�)�'�6�<�<�@�������|�|�#����V�[�[�)�������U�;�<���{��(�(��L�L�����!;�<��=�=�+�+�C�0�#�]�]�F�"�5�5��)�)�#�.�!'������L�L��&�!8�9��;�;�*��A��,�,���6�;�;�!6�7���L�L��O�Q�T�rc���	td�|jj�	tt	j��x|j
_|_|j|�}|j|�}|r2|jd�s!|jddj|��|j
jrQ|j
js;|jd�s*|D]%}|jdk7s�|jdd�n|jj�|j!�y#|jj�wxYw)N�add_cookie_headerrr��Cookie2r%z$Version="1")rr��acquirerdrqr�r�r�r��
has_header�add_unredirected_headerr�rSrUr��release�clear_expired_cookies)r r�r�r�rDs     rr�zCookieJar.add_cookie_headerLs��	�
	�"�#����"�"�$�	)�,/��	�	��,<�<�D�L�L���	��/�/��8�G��&�&�w�/�E���)�)�(�3��3�3� �$�)�)�E�"2�4����$�$�T�\�\�-F�-F��&�&�y�1�%�F��~�~��*��7�7�	�>�R��&�
���&�&�(��"�"�$��
���&�&�(�s�CE�E�Ec�*�	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�[|
�td
��i|dk(rd}	t|
�}
d	}|j|
z}
||vs||vr|
�|d
vrtd|z�d}	n
|
|
|<��|
||<��|	r��|j|||
|f���|S#t$rtd�d}	Y�5wxYw)N)rr�)r�r�r�r�r�r�r�
commenturlr
Fr%Tr�z%   missing value for domain attributer�zM   missing or invalid value for expires attribute: treating as session cookier�z?   missing or invalid (non-numeric) value for max-age attribute)r�rr�z!   missing value for %s attribute)rorrdrpr�r�)r �	attrs_set�
cookie_tuples�
boolean_attrs�value_attrs�cookie_attrsr�r��max_age_set�
bad_cookie�standardr!r�r�r�s               r�_normalized_cookie_tuplesz#CookieJar._normalized_cookie_tuplesms���	��
�+�
�0��
&�L�&�q�/�K�D�%� �K��J��H��D�$�Q�R�(���1��W�W�Y����$��m�(;��A��
�%�!�)��A���=����=��y��F�G�%)�
�����	�A��	�>�"� ��y�� F�G� ��	�>�"&�K����F��"�A��	�	�A�
�A���$�!�}�*<��	��!B�B��B�Q�F�G�%)�
��"#�H�Q�K��D��G�e)�h��� � �$��x��!>�?�Q&�T���5&��� 2�3�%)�
��	�s�C8�8D�Dc�R�|\}}}}|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|jd�sd|z}d}|	tur(|	�t|�}	nd}tjdd|	�}	nd}	|
turd}
d}
n2|
|jkr#	|j|||�t#d|||�yt%||||	||||||||
|
|||�S#t$rYywxYw#t $rY�CwxYw)Nr�r�r�r�r�r�Frrr�rTr�r�r
r%r�z\s+z2Expiring cookie, domain='%s', path='%s', name='%s')r'r�rdrpr�r�r�r��boolr�r�rr�r�r��clear�KeyErrorrr)r �tupr�r�r�rr!r�r�r�r�r�r�rrrrr�rrr�r�rs                       r�_cookie_from_cookie_tuplez#CookieJar._cookie_from_cookie_tuple�sv��'*�#��e�X�t����h��/���|�|�F�F�+���|�|�F�F�+���,�,�y�&�1���,�,�y�$�/����
��g�,�����h��.���,�,�y�%�0���,�,�y�$�/���l�l�<��6���v��$�"�*�!�N��t�$�D�"�N���(�D��
�
�3��A��B�w��a�<����8�D����1��:�D��4�y�A�~�c�t�"��/��"���!%�f�&7�&7��&<�!=���V��-�g�6�N�H�d��F��"�"�3�'���Z�F����v���|�$�G�,��!%���v�v�f�b�$�/���D��f���G��G�
��	�	�
!�
��
�
�6�4��.�
�G��4��
'���g��E��N��.�0B��N�����!��
�
	��C�
��
��v�
��
�s$�5H�H�	H�H�	H&�%H&c��|j|�}g}|D](}|j||�}|s�|j|��*|Sr)rrr�)r r�r�r�r�rrDs       r�_cookies_from_attrs_setz!CookieJar._cookies_from_attrs_set*sH���6�6�y�A�
��� �C��3�3�C��A�F��w�~�~�f�-�!��rc��t|jdd�}|�|jj}|D]#}|jdk(s�d|_|s�d|_�%y)NrTr%Tr
)r7r�rSr�r)r r��
rfc2109_as_nsrDs    r�_process_rfc2109_cookiesz"CookieJar._process_rfc2109_cookies3sV������.C�T�J�
�� � $��� 4� 4�4�M��F��~�~��"�!%��� �&'�F�N�
rc��	|j�}|jdg�}|jdg�}ttj��x|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$rt�g}Y��wxYw#t$rt�g}	Y��wxYw)NzSet-Cookie2z
Set-Cookiec�P�|j|j|jf}||vSr)r�r�r�)�	ns_cookie�lookupr�s   r�no_matching_rfc2965z3CookieJar.make_cookies.<locals>.no_matching_rfc2965ls'��#�*�*�I�N�N�I�N�N�J�C��f�,�,r)r��get_allrdrqr�r�rSrRr	r��	Exceptionr"r�rr�r�r��filterr�)
r �responser�r��rfc2965_hdrs�ns_hdrsrSrRr��
ns_cookiesrrDrs
             r�make_cookieszCookieJar.make_cookies?sq��O��-�-�/�����}�b�9���/�/�,��3��(+�D�I�I�K�(8�8�����D�I��,�,�&�&���<�<�(�(���g����h��'��I�	��2�2�"�<�0�'�;�G��x�
 �!�9�9�$�W�-�w�8�
�

�)�)�*�5����%�F�HL�F�F�M�M�6�;�;����D�E�&�;A�-�$�$7��D�
�����z�*����C�	�%�'��G�	���
 �)�+��
�
 �s$�(E�E&�E#�"E#�&E>�=E>c�n�	|jj�	ttj��x|j_|_|jj
||�r|j|�|jj�y#|jj�wxYwr)	r�r�rdrqr�r�rE�
set_cookier�rCs   r�set_cookie_if_okzCookieJar.set_cookie_if_okvs���;����"�"�$�	)�,/��	�	��,<�<�D�L�L���	��|�|�"�"�6�7�3�����'�
���&�&�(��D���&�&�(�s�A B�B4c��	|j}|jj�	|j|vri||j<||j}|j|vri||j<||j}|||j
<|jj
�y#|jj
�wxYwr)r�r�r�r�r�r�r�)r rD�c�c2�c3s     rrzCookieJar.set_cookie�s���M��M�M�����"�"�$�	)��}�}�A�%�"�q����'7��6�=�=�!�B��{�{�"�$��b����o��F�K�K��B�$�B�v�{�{�O����&�&�(��D���&�&�(�s�A'B+�+Cc��	td|j��|jj�	|j	||�D]<}|j
j
||�s� td|�|j|��>	|jj�y#|jj�wxYw)Nzextract_cookies: %sz setting cookie: %s)	rr�r�r�rr�rErr�)r rr�rDs    r�extract_cookieszCookieJar.extract_cookies�s���O��$�h�m�m�o�6����"�"�$�	)��+�+�H�g�>���<�<�&�&�v�w�7��0�&�9��O�O�F�+�?�

���&�&�(��D���&�&�(�s�1B$�)B$�$Cc��	|�#|�|�td��|j|||=y|�|�td��|j||=y|�|j|=yi|_y)Nz8domain and path must be given to remove a cookie by namez.domain must be given to remove cookies by path)rpr�)r r�r�r�s    rrzCookieJar.clear�s���
	�����D�L� �N�P�P��
�
�f�%�d�+�D�1�
�
��~� �D�F�F��
�
�f�%�d�+�
�
��
�
�f�%��D�Mrc�:�	|jj�	|D]@}|js�|j|j|j
|j��B	|jj�y#|jj�wxYwr)r�r�rrr�r�r�r�)r rDs  r�clear_session_cookieszCookieJar.clear_session_cookies�st��	�	
���"�"�$�	)����>�>��J�J�v�}�}�f�k�k�6�;�;�G��
���&�&�(��D���&�&�(�s�A>�3A>�>Bc�l�	|jj�	tj�}|D]E}|j|�s�|j	|j
|j|j��G	|jj�y#|jj�wxYwr)	r�r�rqr-rr�r�r�r�)r rKrDs   rr�zCookieJar.clear_expired_cookies�s���	�	
���"�"�$�	)��)�)�+�C����$�$�S�)��J�J�v�}�}�f�k�k�6�;�;�G��
���&�&�(��D���&�&�(�s�*B�3B�B3c�,�t|j�Sr)r�r�rcs r�__iter__zCookieJar.__iter__�s���$�-�-�(�(rc�$�	d}|D]}|dz}�	|S)Nr
r%r>)r r�rDs   r�__len__zCookieJar.__len__�s��1�
���F��A��A�d��rc��g}|D]}|jt|���d|jj�ddj	|��d�S�N�<�[r�z]>)r�r8r9r:r��r �rrDs   rr;zCookieJar.__repr__�s:�����F�A�H�H�T�&�\�2�d�!�^�^�4�4�d�i�i��l�C�Crc��g}|D]}|jt|���d|jj�ddj	|��d�Sr,)r�r�r9r:r�r/s   rr3zCookieJar.__str__�s:�����F�A�H�H�S��[�1�d�!�^�^�4�4�d�i�i��l�C�Crr)NNN)!r:r<r=r��compiler�r��strict_domain_re�	domain_re�dots_re�ASCII�magic_rer"r�r�r�r�r�rrr	rrrrr"rr%r�r(r*r;r3r>rrrr�s�����"�*�*�U�#�K��r�z�z�+�&�H�!�r�z�z�+�.����
�
�8�$�I��b�j�j��!�G��r�z�z�6����A�H����$�9�v%�B_�BZ�x�
'�5�n)�)�
)��6
)�)�&)��D�
Drrc��eZdZy)rNr�r>rrrr�r�rrc�2�eZdZ	dd�Zdd�Zdd�Z		dd�Zy)rNc��	tj||�|�tj|�}||_t|�|_yr)rr"�os�fspath�filenamer�	delayload)r r=r>r�s    rr"zFileCookieJar.__init__�s?��	�
	���4��(����y�y��*�H� ��
��i���rc��	t��rrA)r r=�ignore_discard�ignore_expiress    r�savezFileCookieJar.save�s��%�!�#�#rc���	|�(|j�
|j}ntt��t|�5}|j	||||�ddd�y#1swYyxYwr)r=rp�MISSING_FILENAME_TEXT�open�_really_load�r r=r@rAr s     r�loadzFileCookieJar.loadsP��'����}�}�(�T�]�]�(�"�#8�9�9�
�(�^�q����a��>�>�J��^�^�s�A�Ac��	|�(|j�
|j}ntt��|jj	�	tj|j�}i|_	|j|||�	|jj�y#t$r	||_�wxYw#|jj�wxYwr)r=rprDr�r�r�deepcopyr�rH�OSErrorr�)r r=r@rA�	old_states     r�revertzFileCookieJar.reverts���	����}�}�(�T�]�]�(�"�#8�9�9����"�"�$�	)��
�
�d�m�m�4�I��D�M�
��	�	�(�N�N�C�
���&�&�(���
� )��
��
��

���&�&�(�s�&B2�.B�B/�/B2�2C)NFN�NFF)r:r<r=r"rBrHrMr>rrrr�s"��@�
)�$�K�#�49�)rrc��	|j|jfd|jfd|jfg}|j�|jd|jf�|jr|jd�|jr|jd�|jr|jd�|jr|jd�|jr/|jdtt|j��f�|jr|jd	�|jr|jd
|jf�|jr|jd|jf�t!|j"j%��}|D]+}|j|t'|j"|�f��-|jdt'|j(�f�t+|g�S)
Nr�r�r�)�	path_specN)�	port_specN)�
domain_dotN)r�Nr�)rNrr�r�)r�r�r�r�r�r�rrrr�r�rTr�rrr�sortedrr�r�r�r�)rDr
r�r�s    r�lwp_cookie_strrT's����
�+�+�v�|�|�	$�
�&�+�+�	�
�F�M�M�	"�	$�A��{�{�����&�&�+�+�)>� ?�
���a�h�h�':�;�
���a�h�h�':�;�
� � �!�(�(�+?�"@�
�}�}�a�h�h�/�0�
�~�~�q�x�x��(��v�~�~�)>�?�!A�B�
�~�~�q�x�x� 1�2�
�~�~�q�x�x��F�N�N� ;�<�
���1�8�8�\�6�3E�3E�$F�G��&�,�,�#�#�%�&�D�
��	���!�S����a��)�*�+���H�H�i��V�^�^�,�
-�.��a�S�!�!rc�$�eZdZ	dd�Zdd�Zd�Zy)rc���	tj�}g}|D]B}|s
|jr�|s|j|�r�&|jdt	|�z��Ddj|dgz�S)NzSet-Cookie3: %s�
r)rqrr-r�rTr�)r r@rArKr0rDs      r�
as_lwp_strzLWPCookieJar.as_lwp_strPsp��	�
�i�i�k�����F�!�f�n�n��!�f�&7�&7��&<��
�H�H�&���)?�?�@���y�y��B�4�� � rNc��|�(|j�
|j}ntt��tjtj
|tjtjztjzd�d�5}|jd�|j|j||��ddd�y#1swYyxYw)N��wz#LWP-Cookies-2.0
)r=rprDr;�fdopenrE�O_CREAT�O_WRONLY�O_TRUNC�writerXrGs     rrBzLWPCookieJar.save`s������}�}�(�T�]�]�(�"�#8�9�9�
�Y�Y��G�G�H�b�j�j�2�;�;�6����C�U�K��
��
�G�G�(�)�
�G�G�D�O�O�N�N�C�D�
�
�
�s�3C�Cc�J�|j�}|jj|�sd|z}t|��t	j�}d}d}	d}
	|j�x}dk7�r�|j|�s�(|t
|�dj�}t|g�D�]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|j�x}dk7r���yy#t $r�t"$rt%�td|�d����wxYw)Nz5%r does not look like a Set-Cookie3 (LWP) format filezSet-Cookie3:)rQrPrRr�r)r�r�r�r�r�rr�rr
Fr%Tr�rr�r�r�r�rQrRr�rPr�rr�z invalid Set-Cookie3 format file �: )�readliner7rcrrqr�r�r�r�ror'r�rrr-rrKrr")r r r=r@rA�magicr!rK�headerr�r��line�datar�r�rr!r�r�r�r
r�rr�rrs                          rrFzLWPCookieJar._really_loadosf���
�
����}�}�#�#�E�*��$�%�C��C�.� ��i�i�k����.�
�0��
9	.��:�:�<�'�4�B�.����v�.���C��K�L�)�/�/�1��.��v�6�D�"&�q�'�K�D�%�!�H��D�*��&+����+� $�Q�R����1��=�!"����B�!%�B��+�-�2��3F� "�A��
�-� �y�d�!�*+�H�Q�K��+�-�*+�H�Q�K�&'�D��G�!)� !���A��	�l�G��	�l�G��*�"*�7�"3����"&���x�[�F�'-�'8�'8��'=�$��q��|�T�5� ��y�!�K�.�%�'7��<�� ��y�!�K�.� ��{�&�&� ��|� ���#�	%�A�*�a�i�i� �)�a�l�l�3�.?� ��O�O�A�&�[7��:�:�<�'�4�B�.��f�	���	.�%�'��%�t�-�.�
.�	.�s
�FG4�4.H")TTrN)r:r<r=rXrBrFr>rrrrCs��
�!� 
E�J.rrc��eZdZ	d�Zdd�Zy)r	c�t�tj�}tj|j��st	d|z��	|j�x}dk7�r+i}|jt�rd|t<|tt�d}|jd�r|dd}|j�jd�s|j�dk(r��|jd�\}}	}
}}}
}|dk(}|	dk(}	|
dk(r|}
d}|jd�}d	}|dk(rd}d
}td|
|dd	||	||
d	|||dd|�}|s|jr��|s|j|�r��|j|�|j�x}dk7r��*yy#t $r�t"$rt%�t	d|�d
����wxYw)Nz4%r does not look like a Netscape format cookies filerrWr�)�#r��	�TRUEr�FTr
z%invalid Netscape format cookies file rb)rq�NETSCAPE_MAGIC_RGXr�rcrr��HTTPONLY_PREFIX�
HTTPONLY_ATTRr�r�r�r�rrr-rrKrr")r r r=r@rArKrfr!r�rr�r�r�r�r�r�rrs                  rrFzMozillaCookieJar._really_load�s����i�i�k��!�'�'��
�
��5��F����
�<	.��:�:�<�'�4�B�.���
�?�?�?�3�*,�D��'���O� 4� 5�6�D��=�=��&�t�C�R�y���J�J�L�+�+�J�7��J�J�L�B�&���
�
�4�(�M��(�$����u� �F�*��$4��$>� ��2�:�!�D� �E�$�/�/��4�� ���b�=�"�G�"�G��1�d�E���!�#3�[���!�"�"����	!��&�!�)�)��%�!�,�,�s�*;������"�i�:�:�<�'�4�B�.��l�	���	.�%�'��%�t�-�.�
.�	.�s
�D>F	�	.F7Nc
��|�(|j�
|j}ntt��tjtj
|tjtjztjzd�d�5}|jt�tj�}|D�]}|j}|s
|jr�|s|j|�r�3|jrd}nd}|j!d�rd}	nd}	|j"�t%|j"�}
nd}
|j&�d}|j(}n|j(}|j&}|j+t,�r	t.|z}|jdj1||	|j2||
||g�dz���	ddd�y#1swYyxYw)	NrZr[rl�FALSEr�rrkrW)r=rprDr;r\rEr]r^r_r`�NETSCAPE_HEADER_TEXTrqr�rr-r�r�r�r�r�r�r%rornr�r�)
r r=r@rAr rKrDr�r�r�r�r�r�s
             rrBzMozillaCookieJar.save"sz�����}�}�(�T�]�]�(�"�#8�9�9�
�Y�Y��G�G�H�b�j�j�2�;�;�6����C�U�K��
��
�G�G�(�)��)�)�+�C�������%�&�.�.��%�&�*;�*;�C�*@���=�=�6�&�&�f��$�$�S�)��;�$+�k��>�>�-�!�&�.�.�1�G� �G��<�<�'��D�"�K�K�E�!�;�;�D�"�L�L�E��.�.�}�=�,�v�5�F�����I�I�v�{�F�K�K�%�w��e�=�>����3�

�
�
�s
�D2G�GrN)r:r<r=rFrBr>rrr	r	�s���>D.�L'rr	r)X�__all__r;rrJr�rq�urllib.parser��urllib.request�	threadingr��http.client�http�calendarrr
rrrornr��client�	HTTP_PORTrr2rmrDrrr"r+r3rVrXrormrTrYrar6rbrhr{r��Ir��Xr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr	r
rr�rrrrrr�r�rrKrrrTrr	)r.s0r�<module>r~s���6M��
���	��#����
��	
����
�������-�-�.���R�Z�Z� @�A��:����A��
��9��
4��+1�2�6�%����
�6�2��B�&0�(��T��=�	��b�j�j�5�r�x�x�@���6
�p����,�-/�X�X�7���R�Z�Z�2�B�D�D�2�8�8�O�E�
��R�Z�Z��&
�D�D�2�8�8�O�)��*65�p�b�j�j�
� �4�4�"�)�)��#��$5�B3�
$����$6�7��#����$M�N��#����$9�:���2�:�:�h�'��S�j#��
�
�;�/���2�A�H�"�*�*�Y����
)��
�%�N��(�b�j�j��2�8�8�,��� 	��� $���"�*�*�9�:��+��!
�F�"_E�_E�D��B_�,�_�B�"��LD�LD�`���4)�I�4)�n"�8v.�=�v.�rM�}�M��A;3s�J/

?>