Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.144.254.161
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : http2.cpython-312.pyc
�

=f8���ddlmZddlZddlZddlZddlZddlZddlZddl	Z
ddlZ
ddlm
Z
ddlmZddlmZddlmZeZej*d�ZGd	�d
ej.e�ZGd�de�ZGd
�de
�Zdd�Zdd�Zy)�)�annotationsN)�BaseHTTPResponse�)�HTTPHeaderDict)�HTTPSConnection)�HTTPSConnectionPool�Tc�8�eZdZdZdd�Zdd�Z								dd�Zy)	�
_LockedObjectaY
    A wrapper class that hides a specific object behind a lock.

    The goal here is to provide a simple way to protect access to an object
    that cannot safely be simultaneously accessed from multiple threads. The
    intended use of this class is simple: take hold of it with a context
    manager, which returns the protected object.
    c�D�tj�|_||_y�N)�	threading�RLock�lock�_obj)�self�objs  �D/usr/local/python-3.12/lib/python3.12/site-packages/urllib3/http2.py�__init__z_LockedObject.__init__"s���O�O�%��	���	�c�N�|jj�|jSr
)r�acquirer�rs r�	__enter__z_LockedObject.__enter__&s���	�	�����y�y�rc�8�|jj�yr
)r�release)r�exc_type�exc_val�exc_tbs    r�__exit__z_LockedObject.__exit__*s��	
�	�	���rN)rr	)�returnr	)rztype[BaseException] | NonerzBaseException | Nonerztypes.TracebackType | Noner!�None)�__name__�
__module__�__qualname__�__doc__rrr �rrrrs<������,��&��+�	�

�rrc���eZdZ	d
							d�fd�
Zdd�Zd
�fd�Z		d									dd�Zdd�Zd
d�Zdd�Z			dd�Z
d
�fd	�Z�xZS)�HTTP2Connectionc���|j�|_d|_g|_d|vsd|vrt	d��t�|�||fi|��y)N�proxy�proxy_configz$Proxies aren't supported with HTTP/2)�_new_h2_conn�_h2_conn�
_h2_stream�_h2_headers�NotImplementedError�superr)r�host�port�kwargs�	__class__s    �rrzHTTP2Connection.__init__4sS����)�)�+��
�&*���68����f���&� 8�%�&L�M�M�
����t�.�v�.rc��tjjd��}ttjj|���S)NT)�client_side)�config)�h2r9�H2Configurationr�
connection�H2Connection)rr9s  rr-zHTTP2Connection._new_h2_conn@s6�����*�*�t�*�<���R�]�]�7�7�v�7�F�G�Grc����t�|��|j5}|j�|jj|j
��ddd�y#1swYyxYwr
)r2�connectr.�initiate_connection�sock�sendall�data_to_send)r�h2_connr6s  �rr?zHTTP2Connection.connectDsR���
����
�]�]�	6�g��'�'�)��I�I���g�2�2�4�5�	6�	6�	6�s�:A�A(c	��|j5}||_|j�|_d|jvr!d|j�d|j
xsd��}n|j�d|j
xsd��}|jjdd|j�fd|j�fd|j�ff�ddd�y#1swYyxYw)	N�:�[z]:i�)s:schemeshttpss:methods
:authoritys:path)	r.�_request_url�get_next_available_stream_idr/r3r4r0�extend�encode)r�method�url�	skip_host�skip_accept_encodingrD�	authoritys       r�
putrequestzHTTP2Connection.putrequestKs����]�]�	�g� #�D��%�B�B�D�D�O��d�i�i����	�	�{�"�T�Y�Y�-=�#�,>�?�	�#�y�y�k��4�9�9�+;��*<�=�	����#�#�*������1�"�I�$4�$4�$6�7��s�z�z�|�,�	�
�	�	�	�s�B:C�Cc��|D]K}|jj|jd�j�|jd�f��My)Nzutf-8)r0�appendrK�lower)r�header�values�values    r�	putheaderzHTTP2Connection.putheaderdsH���	�E����#�#����w�'�-�-�/����g�1F�G�
�	rc���|j5}|j|j|jd��|j	�x}r|j
j
|�ddd�y#1swYyxYw)NT)�	stream_id�headers�
end_stream)r.�send_headersr/r0rCrArB)rrDrCs   r�
endheaderszHTTP2Connection.endheadersjsn��
�]�]�	0�g�� � ��/�/��(�(��
!�
�
 '�3�3�5�5�|�5��	�	�!�!�,�/�	0�	0�	0�s�AA,�,A5c��|sytd��)Nz Sending data isn't supported yet)r1)r�datas  r�sendzHTTP2Connection.sendts����!�"D�E�Erc	���d}t�}|j5}d}|�s}|jjd�x}�r.|j	|�}|D�]}t|tjj�rnt�}|jD]T\}	}
|	dk(rt|
j��}�%|j|	jd�|
jd���V��t|tjj�r6||jz
}|j!|j"|j$���t|tjj&�s��d}��|j)�x}r|jj+|�|s��}ddd�|j-�|�J�t/||j0t3|���S#1swY�?xYw)NFi��s:status�asciiT)�statusr[�request_urlr`)�	bytearrayr.rA�recv�receive_data�
isinstancer:�events�ResponseReceivedrr[�int�decode�add�DataReceivedr`�acknowledge_received_data�flow_controlled_lengthrZ�StreamEndedrCrB�close�
HTTP2ResponserH�bytes)rrdr`rDr\�
received_datarj�eventr[rUrWrCs            r�getresponsezHTTP2Connection.getresponseys������{��
�]�]�	4�g��J� �$(�I�I�N�N�5�$9�9�=�9�$�1�1�-�@�F�!'�.��%�e�R�Y�Y�-G�-G�H�&4�&6�G�16���&�
���#)�Z�#7�-0�����-@�F�$+�K�K�(.�
�
�g�(>����W�@U�%&�	&�(��r�y�y�/E�/E�F� �E�J�J�.�D�#�=�=� %� <� <�e�o�o��(��r�y�y�/D�/D�E�)-�J�%.�($+�#7�#7�#9�9�<�9��I�I�%�%�l�3�3!�	4�<	
�
�
���!�!�!�����)�)��t��	
�	
�C	4�	4�s�EG�&4G�G#c�D��|j5}	|j�|j�x}r|jj	|�ddd�|j
�|_d|_g|_t�|�)�y#t
$rY�EwxYw#1swY�JxYwr
)r.�close_connectionrCrArB�	Exceptionr-r/r0r2rs)rrDr`r6s   �rrszHTTP2Connection.close�s����
�]�]�	�g�
��(�(�*�"�/�/�1�1�4�1��I�I�%�%�d�+�		��)�)�+��
�������
��
����
��
��	�	�s(�B�=B�	B�B�B�B�Br
)r3�strr4z
int | Noner5z
typing.Anyr!r")r!z)_LockedObject[h2.connection.H2Connection]�r!r")FF)
rLr|rMr|rN�boolrOr~r!r")rUr|rVr|r!r")r`rur!r")r!rt)
r#r$r%rr-r?rQrXr^rarxrs�
__classcell__�r6s@rr)r)3s����,0�
/��
/�)�
/�<F�
/�	
�
/�H�6� �%*�������	�
#��
�
�2�0�F�
+
�	�+
�Z�rr)c�\��eZdZ	d											d�fd�
Zedd��Zdd�Zdd�Z�xZS)	rtc�L��t�|�||dd||��||_d|_y)N�)rdr[�version�reason�decode_contentrer)r2r�_data�length_remaining)rrdr[rer`r�r6s      �rrzHTTP2Response.__init__�s:���	�������)�#�	�		
���
� !��rc��|jSr
)r�rs rr`zHTTP2Response.data�s���z�z�rc��yr
r'rs r�get_redirect_locationz#HTTP2Response.get_redirect_location�s��rc��yr
r'rs rrszHTTP2Response.close�s��r)F)rdrlr[rrer|r`rur�r~r!r")r!rur})	r#r$r%r�propertyr`r�rsrr�s@rrtrt�se��� %�
"��"� �"��	"�
�"��
"�
�"�*�����
rrtc��tt_ttj_dgtjj_y)Nr:)	r)r�
ConnectionCls�urllib3r<r�util�ssl_�ALPN_PROTOCOLSr'rr�inject_into_urllib3r��s/��(7��%�)8�G���&�)-�v�G�L�L���$rc��tt_ttj_dgtjj_y)Nzhttp/1.1)	�orig_HTTPSConnectionrr�r�r<rr�r�r�r'rr�extract_from_urllib3r��s-��(<��%�)=�G���&�(2�|�G�L�L���$rr})�
__future__rr�types�typing�	h2.configr:�
h2.connection�	h2.events�urllib3.connectionr��urllib3.util.ssl_�urllib3.responser�_collectionsrr<r�connectionpoolrr��TypeVarr	�Genericrr)rtr�r�r'rr�<module>r�s~��"���
������-�(�'�/�&���F�N�N�3����F�N�N�1�%��6A�o�A�H
�$�
�D.�4r
© 2025 GrazzMean