MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.226.226.208
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyo
�
r2Wc@@s�ddlmZddlZddlZddlZddlZddlZddlmZm	Z
ddlZddlm
Z
y$ddlmZddlmZWn1ek
r�ddlmZddlmZnXyddlZejZWn3eefk
r$dZdefd	��YZnXy
eZWn'ek
rXd
efd��YZnXddlmZmZm Z m!Z!dd
l"m#Z#m$Z$ddl%m&Z&m'Z'm(Z(m)Z)ddl*m+Z+ddl,m-Z-ej.e/�Z0idd6dd6Z1ej2ddd�Z3de4fd��YZ5dee4fd��YZdefd��YZ6de6fd��YZ7d�Z8er�e6Z9e7Z6ne5Z6dS(i(tabsolute_importN(terrorttimeouti(tsix(tHTTPConnection(t
HTTPExceptiontBaseSSLErrorcB@seZRS((t__name__t
__module__(((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyRstConnectionErrorcB@seZRS((RR(((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyR	 s(tNewConnectionErrortConnectTimeoutErrortSubjectAltNameWarningtSystemTimeWarning(tmatch_hostnametCertificateError(tresolve_cert_reqstresolve_ssl_versiontssl_wrap_sockettassert_fingerprint(t
connection(tHTTPHeaderDictiPthttpi�thttpsi�tDummyConnectioncB@seZdZRS(s-Used to detect a failed ConnectionCls import.(RRt__doc__(((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyRBsRcB@sieZdZedZejejdfgZe	Z
d�Zd�Zd�Z
d�Zddd�ZRS(	s{
    Based on httplib.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:

      - ``strict``: See the documentation on :class:`urllib3.connectionpool.HTTPConnectionPool`
      - ``source_address``: Set the source address for the current connection.

        .. note:: This is ignored for Python 2.6. It is only applied for 2.7 and 3.x

      - ``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::

            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., ``[]``).
    RicO@stjr|jdd�n|jd�|_tjdkrP|jdd�n|jd|j�|_	t
j|||�dS(Ntstricttsource_addressiitsocket_options(ii(RtPY3tpoptNonetgetRtsystversion_infotdefault_socket_optionsRt_HTTPConnectiont__init__(tselftargstkw((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyR%ks	cC@s�i}|jr|j|d<n|jr8|j|d<ny(tj|j|jf|j|�}WnWtk
r�}t|d|j|jf��n&t	k
r�}t
|d|��nX|S(sp Establish a socket connection and set nodelay settings on it.

        :return: New socket connection.
        RRs0Connection to %s timed out. (connect timeout=%s)s(Failed to establish a new connection: %s(RRRtcreate_connectionthosttportRt
SocketTimeoutRtSocketErrorR
(R&textra_kwtconnte((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyt	_new_conn�s 		"cC@s5||_t|dd�r1|j�d|_ndS(Nt_tunnel_hosti(tsocktgetattrRt_tunnelt	auto_open(R&R/((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyt
_prepare_conn�s	
cC@s|j�}|j|�dS(N(R1R7(R&R/((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pytconnect�scC@sxt|dk	r|ni�}d|k}|j||d|�x*|j�D]\}}|j||�qMWd|kr�|jdd�n|j�|dk	rgtjtjf}t	||�r�|f}nx�|D]�}	|	s�q�nt	|	tj�s
|	j
d�}	ntt|	��d}
|j
|
j
d��|j
d	�|j
|	�|j
d	�q�Wn|j
d
�dS(s�
        Alternative to the common request method, which sends the
        body with chunked encoding and not as one block
        saccept-encodingtskip_accept_encodingstransfer-encodingsTransfer-Encodingtchunkedtutf8isutf-8s
s0

N(RRt
putrequesttitemst	putheadert
endheadersRtstring_typestbinary_typet
isinstancetencodethextlentsend(R&tmethodturltbodytheadersR9theadertvaluetstringish_typestchunktlen_str((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pytrequest_chunked�s.



N(RRRtport_by_schemetdefault_porttsockettIPPROTO_TCPtTCP_NODELAYR#tFalsetis_verifiedR%R1R7R8RRP(((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyRGs
				tHTTPSConnectioncB@s6eZedZddddejd�Zd�ZRS(Rc	K@sAtj|||d|d||�||_||_d|_dS(NRRR(RR%tkey_filet	cert_filet	_protocol(R&R*R+RYRZRRR(((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyR%�s

		cC@s;|j�}|j|�tj||j|j�|_dS(N(R1R7tssltwrap_socketRYRZR3(R&R/((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyR8�s
N(	RRRQRRRRSt_GLOBAL_DEFAULT_TIMEOUTR%R8(((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyRX�s
	tVerifiedHTTPSConnectioncB@sSeZdZdZdZdZdZdZdddddddd�Z	d�Z
RS(s[
    Based on httplib.HTTPSConnection but wraps the socket with
    SSL certification.
    cC@s�|s|r!|dkr!d}n||_||_||_||_||_|octjj|�|_	|o~tjj|�|_
dS(Nt
CERT_REQUIRED(RRYRZt	cert_reqstassert_hostnameRtostpatht
expandusertca_certstca_cert_dir(R&RYRZRaRfRbRRg((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pytset_cert�s						cC@s�|j�}t|j�}t|j�}|j}t|dd�rm||_|j	�d|_
|j}ntj
j�tk}|r�tjdjt�t�nt||j|jd|d|jd|jd|d|�|_|jrt|jjd	t�|j�nt|tjkr�|jtk	r�|jj�}|j d
d�sitjdj|�t!�nt"||jp{|�n|tj#kp�|jdk	|_$dS(
NR2isWSystem time is way off (before {0}). This will probably lead to SSL verification errorsRaRfRgtserver_hostnametssl_versiontbinary_formtsubjectAltNames�Certificate for {0} has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)((%R1RRaRRjR*R4RR3R5R6R2tdatetimetdatettodaytRECENT_DATEtwarningstwarntformatR
RRYRZRfRgRtgetpeercerttTrueR\t	CERT_NONERbRVR Rt_match_hostnameR`RW(R&R/tresolved_cert_reqstresolved_ssl_versionthostnametis_time_offtcert((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyR8�sF		
	
			

N(RRRRRaRfRgRjRRhR8(((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyR_�s
cC@sJyt||�Wn2tk
rE}tjd||�||_�nXdS(Ns@Certificate did not match expected hostname: %s. Certificate: %s(RRtlogRt
_peer_cert(R|tasserted_hostnameR0((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyRw7s
	(:t
__future__RRmtloggingRcR!RSRR-RR,RqtpackagesRthttp.clientRR$RtImportErrorthttplibR\tSSLErrorRtAttributeErrorRt
BaseExceptionR	t	NameErrort	Exceptiont
exceptionsR
RRR
tpackages.ssl_match_hostnameRRt	util.ssl_RRRRtutilRt_collectionsRt	getLoggerRR}RQRnRptobjectRRXR_RwtUnverifiedHTTPSConnection(((sT/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyt<module>sV



""
�V		

MMCT - 2023