AlkantarClanX12

Your IP : 18.116.86.160


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/urllib3/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/urllib3/__pycache__/connection.cpython-311.pyc

�

�܋f&���X�ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddl
m
Z
ddl
mZddlmZejrddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZm Z m!Z!ddl"m#Z#ddl$m%Z%	ddl&Z&e&j'Z(n#e)e*f$rdZ&Gd�de+��Z(YnwxYwddl,m-Z-ddl,m.Z.ddl,m/Z/ddl0m1Z1ddl2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8ddl9m:Z:m;Z;m<Z<m=Z=ddl>m?Z?ddlm@ZAddlmBZBmCZCmDZDmEZEmFZFddlGmHZHmIZIddlJmKZKeLZLeMZMejNeO��ZPddd �ZQejRd!dd��ZSejTd"��ZUeVed#��ZWGd$�d%e��ZGd&�d'e��ZXGd(�d)ejY��ZZd*d+�dYdE�Z[	dZd[dL�Z\d\dQ�Z]d]dR�Z^GdS�dT��Z_e&se_ZXeXZ`	d^d_dX�ZadS)`�)�annotationsN)�HTTPConnection)�
HTTPException)�ResponseNotReady��timeout)�Literal���HTTPResponse)�_TYPE_PEER_CERT_RET_DICT)�SSLTransport)�HTTPHeaderDict)�assert_header_parsing)�_DEFAULT_TIMEOUT�
_TYPE_TIMEOUT�Timeout)�to_str)�
wait_for_readc��eZdZdS)�BaseSSLErrorN)�__name__�
__module__�__qualname__���I/opt/cloudlinux/venv/lib64/python3.11/site-packages/urllib3/connection.pyrr$s�������rr)�
_TYPE_BODY)�ProxyConfig)�_ResponseOptions��__version__)�ConnectTimeoutError�HeaderParsingError�NameResolutionError�NewConnectionError�
ProxyError�SystemTimeWarning)�SKIP_HEADER�SKIPPABLE_HEADERS�
connection�ssl_)�body_to_chunks)�assert_fingerprint)�create_urllib3_context�is_ipaddress�resolve_cert_reqs�resolve_ssl_version�ssl_wrap_socket)�CertificateError�match_hostname)�Url�Pi���http�httpsi�z[^-!#$%&'*+.^_`|~0-9a-zA-Z]�auditc����eZdZUdZedZded<ejej	dfgZ
ded<dZd	ed
<dZded
<ded<ded<ded<d	ed<ded<ded<ded<ded<	dMe
dde
ddd�dN�fd*�ZedOd+���ZejdPd-���ZdQd/�Z			dRdS�fd3�
ZdTd4�ZedUd5���ZedUd6���ZedUd7���ZdT�fd8�Z		dVdW�fd=�
ZdX�fd@�Z		dYddAdAdAdB�dZdI�Z		dYd[dJ�Zd\�fdL�Z�xZS)]ra�
    Based on :class:`http.client.HTTPConnection` but provides an extra constructor
    backwards-compatibility layer between older and newer Pythons.

    Additional keyword parameters are used to configure attributes of the connection.
    Accepted parameters include:

    - ``source_address``: Set the source address for the current connection.
    - ``socket_options``: Set specific options on the underlying socket. If not specified, then
      defaults are loaded from ``HTTPConnection.default_socket_options`` which includes disabling
      Nagle's algorithm (sets TCP_NODELAY to 1) unless the connection is behind a proxy.

      For example, if you wish to enable TCP Keep Alive in addition to the defaults,
      you might pass:

      .. code-block:: python

         HTTPConnection.default_socket_options + [
             (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
         ]

      Or you may want to disable the defaults by passing an empty list (e.g., ``[]``).
    r9ztyping.ClassVar[int]�default_portr
z0typing.ClassVar[connection._TYPE_SOCKET_OPTIONS]�default_socket_optionsF�bool�is_verifiedNzbool | None�proxy_is_verified�int�	blocksize�tuple[str, int] | None�source_addressz&connection._TYPE_SOCKET_OPTIONS | None�socket_options�_has_connected_to_proxyz_ResponseOptions | None�_response_options�
str | None�_tunnel_host�
int | None�_tunnel_port�_tunnel_scheme� )rrErCrF�proxy�proxy_config�host�str�portrr�&None | connection._TYPE_SOCKET_OPTIONSrO�
Url | NonerP�ProxyConfig | None�return�Nonec����t���||tj|��||���||_||_||_d|_d|_d|_	d|_
d|_dS)N)rQrSrrErCF)�super�__init__r�resolve_default_timeoutrFrOrPrGrHrJrLrM)
�selfrQrSrrErCrFrOrP�	__class__s
         �rr[zHTTPConnection.__init__�s����	��������3�G�<�<�)��	�	
�	
�	
�-�����
�(���',��$�!%���(,���(,���*.����rc�6�|j�d��S)a�
        Getter method to remove any trailing dots that indicate the hostname is an FQDN.

        In general, SSL certificates don't include the trailing dot indicating a
        fully-qualified domain name, and thus, they don't validate properly when
        checked against a domain name that includes the dot. In addition, some
        servers may not expect to receive the trailing dot when provided.

        However, the hostname with trailing dot is critical to DNS resolution; doing a
        lookup with the trailing dot will properly only resolve the appropriate FQDN,
        whereas a lookup without a trailing dot will search the system's search domain
        list. Thus, it's important to keep the original host around for use only in
        those cases where it's appropriate (i.e., when doing DNS lookup to establish the
        actual TCP connection across which we're going to send HTTP requests).
        �.)�	_dns_host�rstrip�r]s rrQzHTTPConnection.host�s��"�~�$�$�S�)�)�)r�valuec��||_dS)z�
        Setter for the `host` property.

        We assume that only urllib3 uses the _dns_host attribute; httplib itself
        only uses `host`, and it seems reasonable that other libraries follow suit.
        N)ra)r]rds  rrQzHTTPConnection.host�s������r�
socket.socketc	��	tj|j|jf|j|j|j���}n~#tj$r}t|j
||��|�d}~wt$r'}t|d|j
�d|j�d���|�d}~wt$r}t|d|����|�d}~wwxYwtr!t!jd||j
|j��|S)zoEstablish a socket connection and set nodelay settings on it.

        :return: New socket connection.
        )rErFNzConnection to z timed out. (connect timeout=�)z&Failed to establish a new connection: zhttp.client.connect)r+�create_connectionrarSrrErF�socket�gaierrorr%rQ�
SocketTimeoutr#�OSErrorr&�_HAS_SYS_AUDIT�sysr;)r]�sock�es   r�	_new_connzHTTPConnection._new_conn�s)��
	��/�����+���#�2�#�2�	���D�D����	A�	A�	A�%�d�i��q�9�9�q�@������	�	�	�%��X���X�X���X�X�X����
�����
�	�	�	�$��B�q�B�B����
�����	�����	I��I�+�T�4�9�d�i�H�H�H��s-�36�B1�A�
B1�)"B�
B1�B,�,B1�headers�typing.Mapping[str, str] | None�schemec���|dvrtd|�d����t���|||���||_dS)Nr8z$Invalid proxy scheme for tunneling: z", must be either 'http' or 'https')rSrs)�
ValueErrorrZ�
set_tunnelrM)r]rQrSrsrur^s     �rrxzHTTPConnection.set_tunnel�s`����*�*�*��c�v�c�c�c���
�	�����4�d�G��<�<�<�$����rc��|���|_|jrd|_|���t|j��|_dS)NT)rrrprJrG�_tunnelr?rOrcs r�connectzHTTPConnection.connect�sO���N�N�$�$��	���	�+/�D�(�
�L�L�N�N�N�
(,�D�J�'7�'7��$�$�$rc��|jduS�N)rprcs r�	is_closedzHTTPConnection.is_closeds���y�D� � rc�B�|j�dSt|jd���S)NFgr)rprrcs r�is_connectedzHTTPConnection.is_connecteds'���9���5� ���C�8�8�8�8�8rc��|jSr})rGrcs r�has_connected_to_proxyz%HTTPConnection.has_connected_to_proxy
s���+�+rc�4��	t�����d|_d|_d|_d|_d|_d|_d|_d|_	dS#d|_d|_d|_d|_d|_d|_d|_d|_	wxYw)NF)
rZ�closerpr@rArGrHrJrLrM)r]r^s �rr�zHTTPConnection.closes����	'��G�G�M�M�O�O�O��D�I�$�D��%)�D�"�+0�D�(�%)�D�"� $�D�� $�D��"&�D������D�I�$�D��%)�D�"�+0�D�(�%)�D�"� $�D�� $�D��"&�D��&�&�&�&s� A�:B�method�url�	skip_host�skip_accept_encodingc����t�|��}|r(td|�d|����d����t	���||||���S)�z+Method cannot contain non-token characters z (found at least rh)r�r�)�_CONTAINS_CONTROL_CHAR_RE�searchrw�grouprZ�
putrequest)r]r�r�r�r��matchr^s      �rr�zHTTPConnection.putrequests����*�0�0��8�8���	��k�f�k�k�Y^�Yd�Yd�Yf�Yf�k�k�k���
��w�w�!�!��C�9�CW�"�
�
�	
r�header�valuesc�J��td�|D����st��j|g|�R�dSt|�����t
vrDd�d�tt
��D����}td|�d����dS)r�c3�VK�|]$}t|t��o
|tkV��%dSr})�
isinstancerRr))�.0�vs  r�	<genexpr>z+HTTPConnection.putheader.<locals>.<genexpr>3s6����K�K�q�:�a��%�%�:�!�{�*:�K�K�K�K�K�Krz', 'c�B�g|]}t�|����Sr)rR�title)r�r�s  r�
<listcomp>z,HTTPConnection.putheader.<locals>.<listcomp>7s$��K�K�K�v����6�"�"�K�K�Krz(urllib3.util.SKIP_HEADER only supports '�'N)	�anyrZ�	putheaderr�lowerr*�join�sortedrw)r]r�r��skippable_headersr^s    �rr�zHTTPConnection.putheader1s�����K�K�F�K�K�K�K�K�	��E�G�G��f�.�v�.�.�.�.�.�.�
�F�L�L�N�N�
#�
#�+<�
<�
<� &���K�K��8I�1J�1J�K�K�K�!�!���O�;L�O�O�O���
�	=�
<rT)�chunked�preload_content�decode_content�enforce_content_length�body�_TYPE_BODY | Noner�r�r�r�c��|j�|j�|j��t|||||���|_|�i}td�|D����}	d|	v}
d|	v}|�|||
|���t|||j���}|j	}
|j
}|rd|	vr|�dd	��nPd
|	vrd}nId|	vrd}nBd}|�|
�d}|�dd	��n#|�d
t|����d|	vr"|�dt����|���D]\}}|�||���|���|
�q|
D]n}|s�t!|t��r|�d��}|r(|�dt'|��|fz���Y|�|���o|r|�d��dSdS)N)�request_method�request_urlr�r�r�c3�XK�|]%}t|�����V��&dSr})rr�)r��ks  rr�z)HTTPConnection.request.<locals>.<genexpr>bs2����C�C�a��q�w�w�y�y� 1� 1�C�C�C�C�C�Crzaccept-encodingrQ)r�r�)r�rCztransfer-encodingzTransfer-Encodingr�zcontent-lengthFTzContent-Lengthz
user-agentz
User-Agentzutf-8s%x
%b
s0

)rp�
settimeoutrr rH�	frozensetr�r-rC�chunks�content_lengthr�rR�_get_default_user_agent�items�
endheadersr��encode�send�len)r]r�r�r�rsr�r�r�r��header_keysr�r��
chunks_and_clr�r�r�rd�chunks                  r�requestzHTTPConnection.request?s����9� ��I� � ���.�.�.�"2�!��+�)�#9�"
�"
�"
����?��G��C�C�7�C�C�C�C�C��0�K�?���k�)�	�����C�.B�i�	�	
�	
�	
�'�t�F�d�n�U�U�U�
��%��&�5���	J�"�+�5�5����2�I�>�>�>��
 �;�.�.����$��3�3���� ��!�)��)�"&�����':�I�F�F�F���N�N�#3�S��5H�5H�I�I�I��{�*�*��N�N�<�)@�)B�)B�C�C�C�$�]�]�_�_�	*�	*�M�F�E��N�N�6�5�)�)�)�)����������

%�

%������e�S�)�)�2�!�L�L��1�1�E��%��I�I�o��U���U�0C�C�D�D�D�D��I�I�e�$�$�$�$��	$��I�I�l�#�#�#�#�#�	$�	$rc�r�tjdtd���|�||||d���dS)z�
        Alternative to the common request method, which sends the
        body with chunked encoding and not as one block
        z�HTTPConnection.request_chunked() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTPConnection.request(..., chunked=True).���category�
stacklevelT)r�rsr�N)�warnings�warn�DeprecationWarningr�)r]r�r�r�rss     r�request_chunkedzHTTPConnection.request_chunked�sM��	�
�
X�'��		
�	
�	
�	
�	
���V�S�t�W�d��K�K�K�K�Krrc
�j��|j�t���|j}d|_|j�|j��ddlm}t�����}	t|j
��nO#ttf$r;}t�dt||j��|d���Yd}~nd}~wwxYwt#|j
�����}||||j|j|j|j|j||j|j|j���}|S)a
        Get the response from the server.

        If the HTTPConnection is in the correct state, returns an instance of HTTPResponse or of whatever object is returned by the response_class variable.

        If a request has not been sent or if a previous response has not be handled, ResponseNotReady is raised. If the HTTP response indicates that the connection should be closed, then it will be closed before the response is returned. When the connection is closed, the underlying socket is closed.
        Nr
rz$Failed to parse headers (url=%s): %sT)�exc_info)r�rs�status�version�reasonr�r��original_responser�r�r�)rHrrpr�r�responserrZ�getresponser�msgr$�	TypeError�log�warning�_url_from_connectionr�rr�r�r�r�r�r�r�r�)r]�resp_optionsr�httplib_response�hpersr�r^s       �rr�zHTTPConnection.getresponse�sr����!�)�"�$�$�$��-��!%���	
�	���T�\�*�*�*�	+�*�*�*�*�*�!�7�7�.�.�0�0��	�!�"2�"6�7�7�7�7��"�I�.�	�	�	��K�K�6�$�T�<�+C�D�D���	
�
�
�
�
�
�
�
�
�����	����!�!1�!5�!;�!;�!=�!=�>�>���<�!��#�*�$�,�#�*�(�8�'�6�.�#/�#F�'�6�$�0�
�
�
���s�+B�C�1C�Cr})rQrRrSrKrrrErDrCrBrFrTrOrUrPrVrWrX�rWrR)rdrRrWrX)rWrf)NNr9)
rQrRrSrKrsrtrurRrWrX�rWrX)rWr?)FF)
r�rRr�rRr�r?r�r?rWrX)r�rRr�rRrWrX)NN)r�rRr�rRr�r�rsrtr�r?r�r?r�r?r�r?rWrX)
r�rRr�rRr�r�rsrtrWrX)rWr)rrr�__doc__�port_by_schemer=�__annotations__rj�IPPROTO_TCP�TCP_NODELAYr>r@rArr[�propertyrQ�setterrrrxr{r~r�r�r�r�r�r�r�r��
__classcell__�r^s@rrrSs"����������0*8��)?�L�?�?�?�?�

�	�V�/��3�P������
�K�����&*��)�)�)�)��N�N�N�*�*�*�*�:�:�:�:�!�!�!�!�.�.�.�.�������������
 �/�
"2�15��.D� �+/�/�/�/�/�/�/�/�/�F�*�*�*��X�*�$
�[�����[������D �37��%�%�%�%�%�%�%�8�8�8�8��!�!�!��X�!��9�9�9��X�9�
�,�,�,��X�,�
'�
'�
'�
'�
'�
'�& �%*�
�
�
�
�
�
�
�(
�
�
�
�
�
�$#'�37�_$�� $�#�'+�_$�_$�_$�_$�_$�_$�J#'�37�L�L�L�L�L�&5�5�5�5�5�5�5�5�5�5rrc���eZdZUdZedZdZded<dZded<dZ	ded<dZ
d	ed
<dZded<dZded
<dZ
ded<dZded<	d3eddejddddddddddddddddd�d4�fd+�Z									d5d6d,�Zd7d-�Zd8d2�Z�xZS)9�HTTPSConnectionz�
    Many of the parameters to this constructor are passed to the underlying SSL
    socket by means of :py:func:`urllib3.util.ssl_wrap_socket`.
    r:N�int | str | None�	cert_reqsrI�ca_certs�ca_cert_dir�None | str | bytes�ca_cert_data�ssl_versionrK�ssl_minimum_version�ssl_maximum_versionr.rN)rrErCrFrOrPr��assert_hostnamer.�server_hostname�ssl_contextr�r�r�r�r�r��	cert_file�key_file�key_passwordrQrRrSrrrErDrCrBrFrTrOrUrPrVr��None | str | Literal[False]r�r��ssl.SSLContext | Noner�r�r�rWrXc
����t���||||||||���||_||_||_|
|_||_|
|_||_||_	||_
||_|otj
�|��|_|otj
�|��|_||_|	�#|j�
|jj}	nt'd��}	|	|_dS)N)rSrrErCrFrOrP)rZr[r�r�r�r�r�r�r.r�r�r��os�path�
expanduserr�r�r��verify_moder1r�)r]rQrSrrErCrFrOrPr�r�r.r�r�r�r�r�r�r�r�r�r�r�r^s                       �rr[zHTTPSConnection.__init__�s���6	��������)��)��%�	�		
�		
�		
�!��
�"���(���&���.���.���"4���&���#6�� �#6�� � �A�R�W�%7�%7��%A�%A��
�&�J�2�7�+=�+=�k�+J�+J���(�������+� �,�8�	�	�-�d�3�3�	�"����rc
��tjdtd���|�#|j�
|jj}ntd��}||_||_||_||_	||_
||_|otj
�|��|_|otj
�|��|_|	|_dS)zX
        This method should only be called once, before the connection is used.
        z�HTTPSConnection.set_cert() is deprecated and will be removed in urllib3 v2.1.0. Instead provide the parameters to the HTTPSConnection constructor.r�r�N)r�r�r�r�r�r1r�r�r�r�r�r.r�r�r�r�r�r�)
r]r�r�r�r�r�r�r.r�r�s
          r�set_certzHTTPSConnection.set_cert8s���	�
�
+�(��	
�	
�	
�	
�����+� �,�8�	�	�-�d�3�3�	� ��
�"���"���(���.���"4��� �A�R�W�%7�%7��%A�%A��
�&�J�2�7�+=�+=�k�+J�+J���(����rc�
�|���x|_}|j}d}|j�Q|jdkr$|�|j|��x|_}d}d|_|���|j}|j�|j}tj
���tk}|r#tjdt�d�t��t!did|�d|j�d|j�d	|j�d
|j�d|j�d|j�d
|j�d|j�d|j�d|j�d|�d|j�d|�d|j�d|j��}|j|_|j|_tA|j!��|_dS)NFr:TzSystem time is way off (before z5). This will probably lead to SSL verification errorsrpr�r�r�r�r�r�r�r�r�r�r�r��
tls_in_tlsr�r.r)"rrrprQrJrM�_connect_tls_proxyrGrzr��datetime�date�today�RECENT_DATEr�r�r(�#_ssl_wrap_socket_and_match_hostnamer�r�r�r�r�r�r�r�r�r�r�r�r.rjr@r?rO)r]rpr�r��is_time_off�sock_and_verifieds      rr{zHTTPSConnection.connectas���>�>�+�+�+��	�D�#�y���
���(��"�g�-�-�#'�#:�#:�4�9�d�#K�#K�K��	�D�!�
�,0�D�(��L�L�N�N�N�"�/�O���+�"�2�O��m�)�)�+�+�k�9���	��M�6�k�6�6�6�"�
�
�
�@�
�
�
���
��n�n�
��(�(�
�!%� 8� 8�	
�
!%� 8� 8�
��]�]�

��(�(�
��*�*�
��n�n�
��]�]�
��*�*�
�,�O�
��(�(�
�"�z�
�!�0�0�
�  $�6�6�!
��$&�,��	�,�8���
(,�D�J�'7�'7��$�$�$r�hostnamerprf�
ssl.SSLSocketc��tjt|j��}|j}t|f|j|j|j|j	|j
|j|j|||j
|jddddd��}|j|_|jS)zY
        Establish a TLS connection to the proxy using the provided SSL context.
        NF)r�r�r�r�r�r�r�r�r�r�r.r�r�r�r�)�typing�castrrPr�rr�r�r�r�r�r�r�r�r.r@rArj)r]rrprPr�rs      rr�z"HTTPSConnection._connect_tls_proxy�s���
�{�;��0A�B�B��"�.��?��
��n��(� $� 8� $� 8��]��(��*�$�#�(�8�+�>�����#
�
�
��&"3�!>��� �'�'rr}).rQrRrSrKrrrErDrCrBrFrTrOrUrPrVr�r�r�r�r.rIr�rIr�r�r�rIr�rIr�r�r�rKr�rKr�r�r�rIr�rIr�rIrWrX)	NNNNNNNNN)r�rIr�rIr�r�r�rIr�rIr�r�r.rIr�rIr�r�rWrXr�)rrRrprfrWr)rrrr�r�r=r�r�r�r�r�r�r�r�r.rrr>r[r�r{r�r�r�s@rr�r��s�����������
"�'�*�L�"&�I�&�&�&�&��H�����"�K�"�"�"�"�'+�L�+�+�+�+�$(�K�(�(�(�(�&*��*�*�*�*�&*��*�*�*�*�%)��)�)�)�)�
 �:#�
"2�15��.<�.S� �+/�&*�7;�)-�&*�-1�#�"&�+/�*.�*.�(,� $�#�#'�3:#�:#�:#�:#�:#�:#�:#�:#�| $� $�&*�#'�#�7;�)-�"&�+/�')�')�')�')�')�R98�98�98�98�v(�(�(�(�(�(�(�(rr�c�(�eZdZUdZded<ded<dS)�_WrappedAndVerifiedSocketz[
    Wrapped socket and whether the connection is
    verified after the TLS handshake
    zssl.SSLSocket | SSLTransportrjr?r@N)rrrr�r�rrrr	r	�s6���������
)�(�(�(������rr	F)r�rprfr��None | str | intr�r�rKr�r�rIr�r�r�r�r�r�r�r�r.r�r�r�r�r?rWc��d}|�0d}tt|��||t|�����}n|}t|��|_|s|s|dustjstjsd|_|s*|	s(|
s&|r$t|d��r|�	��|
�G|
�
d��}d|vr|d|�d���}t|��r|}
t||||||	|
|
||��
�
}	|r%t|�d�	��|��n_|jt jkrJ|jsC|dur?|���}|rd}nt%|d
d��pd}t'||p|
|��t)||jt jkpt-|�����S#t.$r|����wxYw)a2Logic for constructing an SSLContext from all TLS parameters, passing
    that down into ssl_wrap_socket, and then doing certificate verification
    either via hostname or fingerprint. This function exists to guarantee
    that both proxies and targets have the same behavior when connecting via TLS.
    FNT)r�r�r�r��load_default_certs�[]�%)
rp�keyfile�certfiler�r�r�r�r�r�r�)�binary_form�hostname_checks_common_name)rjr@)r/r2r1r�r,�IS_PYOPENSSL�HAS_NEVER_CHECK_COMMON_NAME�check_hostname�hasattrr�strip�rfindr0r3�_assert_fingerprint�getpeercert�ssl�	CERT_NONE�getattr�_match_hostnamer	�
CERT_REQUIREDr?�
BaseExceptionr�)rpr�r�r�r�r�r�r�r�r�r�r�r.r�r�r��default_ssl_context�context�
normalized�ssl_sock�certrs                      rrr�s���0 ����"��(�+�K�8�8� 3� 3�'�	�2�2�	
�
�
�����+�I�6�6�G��
	�'��'�
�e�#�#���$��/�	$�"'���
�%��%��%�
 �	%�

�G�1�2�2�%�	�"�"�$�$�$�
�"�$�*�*�4�0�0�
��*���#�$;�j�&6�&6�s�&;�&;�$;�<�J��
�#�#�	)�(�O��
���!���!�'������H�#��	���$�$��$�6�6�8J�
�
�
�
�
��3�=�0�0��*�
1��u�,�,�-5�-A�-A�-C�-C�D�
#�
�.3�+�+��G�%B�E�J�J�S�e�,�
���2�?�+�
�
�
�)���+�s�/@�@�(��&�'�'�
�
�
�	
��
����������
����s
�B8F:�: Gr%�_TYPE_PEER_CERT_RET_DICT | None�asserted_hostnamerRrrXc���|�d��}t|��r|}	t|||��dS#t$r)}t�d||��||_�d}~wwxYw)Nr
z@Certificate did not match expected hostname: %s. Certificate: %s)rr0r5r4r�r��
_peer_cert)r%r'r�stripped_hostnamerqs     rrrBs���*�/�/��5�5���%�&�&�.�-����t�.�0K�L�L�L�L�L���	�	�	����N���	
�	
�	
����
�����	���s�;�
A.�$A)�)A.�err�	Exception�proxy_schemer'c���d�tjdt|���������}d|vpd|v}d}td|r|dkr|nd��|��}||_|S)	N� z[^a-z]zwrong version numberzunknown protocolz�. Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#https-proxy-error-http-proxyzUnable to connect to proxyr:r�)r��re�splitrRr�r'�	__cause__)r+r-�error_normalized�is_likely_http_proxy�http_proxy_warning�new_errs      r�_wrap_proxy_errorr7\s����x�x����3�s�8�8�>�>�3C�3C� D� D�E�E���"2�2�	2��!1�1��
	(���	\�!5�Y�,�'�:Q�:Q���WY�	\�	\����G�
�G���Nrc��dt��S)Nzpython-urllib3/r!rrrr�r�ts��*�[�*�*�*rc��eZdZdZdS)�DummyConnectionz-Used to detect a failed ConnectionCls import.N)rrrr�rrrr:r:xs������7�7�7�7rr:�conn� HTTPConnection | HTTPSConnectionr�c�x�t|t��rdnd}t||j|j|���jS)zUReturns the URL from a given connection. This is mainly used for testing and logging.r:r9)rurQrSr�)r�r�r6rQrSr�)r;r�rus   rr�r��s:��
#�4��9�9�
E�W�W�v�F��f�4�9�4�9�4�H�H�H�L�Lr)"rprfr�r
r�r
r�rKr�rKr�rIr�rIr�rIr�rIr�rIr�r�r�r�r.rIr�rIr�r�r�r?rWr	)F)r%r&r'rRrr?rWrX)r+r,r-rIrWr'r�r})r;r<r�rIrWrR)b�
__future__rr��loggingr�r0rjrorr��http.clientr�_HTTPConnectionrrrrl�
TYPE_CHECKING�typing_extensionsr	r�r�	util.ssl_r
�util.ssltransportr�_collectionsr�
util.responser�util.timeoutrrr�	util.utilr�	util.waitrr�SSLErrorr�ImportError�AttributeErrorr �_base_connectionrrr �_versionr"�
exceptionsr#r$r%r&r'r(�utilr)r*r+r,�util.requestr-r.rr/r0r1r2r3�util.ssl_match_hostnamer4r5�util.urlr6�ConnectionError�BrokenPipeError�	getLoggerrr�r�r�r��compiler�rrnr��
NamedTupler	rrr7r�r:�VerifiedHTTPSConnectionr�rrr�<module>r[s��"�"�"�"�"�"���������	�	�	�	�	�	�	�	�
�
�
�
�
�
�
�
�
�
�
�
�����9�9�9�9�9�9�6�6�6�6�6�6�(�(�(�(�(�(�+�+�+�+�+�+�	��0�)�)�)�)�)�)�&�&�&�&�&�&�3�3�3�3�3�3�/�/�/�/�/�/�(�(�(�(�(�(�0�0�0�0�0�0�B�B�B�B�B�B�B�B�B�B�������$�$�$�$�$�$�
��J�J�J��<�L�L���^�$�
�
�
�
�C�
�
�
�
�
�}�
�
�
�
�
�
����)�(�(�(�(�(�8�8�8�8�8�8�B�B�B�B�B�B�!�!�!�!�!�!�����������������C�B�B�B�B�B�B�B�B�B�B�B�(�(�(�(�(�(�@�@�@�@�@�@���������������F�E�E�E�E�E�E�E�������"��!���g���!�!���s�+�+���h�m�D�!�Q�'�'��&�B�J�'E�F�F�����g�&�&��U�U�U�U�U�_�U�U�U�pL(�L(�L(�L(�L(�n�L(�L(�L(�^������ 1����6�#{�{�{�{�{�{�B).������4����0+�+�+�+�8�8�8�8�8�8�8�8��&�%�O�*��@D�M�M�M�M�M�M�Ms�B
�
B'�&B'