KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache
System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : andertr9 ( 1047)
PHP Version : 8.2.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/mercurial/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/mercurial/httpconnection.pyc
�
Hq�Qc@s�ddlZddlZddlZddlZddlZddlmZddlmZddlmZddl	m
Z
defd��YZd�Z
d	ejfd
��YZdejfd��YZead
Zdejejfd��YZdS(i����N(t
httpclient(tsslutil(tutil(t_thttpsendfilecBs eZdZd�Zd�ZRS(s�This is a wrapper around the objects returned by python's "open".

    Its purpose is to send file-like objects via HTTP.
    It do however not define a __len__ attribute because the length
    might be more than Py_ssize_t can handle.
    cOs�||_t||�|_|jj|_|jj|_|jj|_tj|jj��j	|_
d|_|j
dd|_dS(Niii(
tuitopent_datatseektclosetwritetostfstattfilenotst_sizetlengtht_post_total(tselfRtargstkwargs((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyt__init__s		cOs�y|jj||�}Wn*tk
rE|jjtd�d�nX|jt|�7_|jjtd�|jddtd�d|j	�|S(Ntsendingitunittkbttotal(
RtreadtEOFErrorRtprogressRtNoneRtlenR(RRRtret((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyR+s
(t__name__t
__module__t__doc__RR(((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyRs	
c
CsIt�}x�|jd�D]�\}}d|krN|jtd�|�qn|jdd�\}}|j|t��}|dkr�tj|�}n|||<qWd|kr�|jdd�\}	}
n
d	|}	}
d}d
}d}
xU|j
�D]G\}}|r*||jd|�kr*q�n|jd�}|sEq�n|jdd�}t|�dkr�|d
g|d}}n|jd�p�d
j�}|dks�|
j
|�r�t|�|ks�t|�|kr�|r�d|kr�|	|kr�t|�}||f}
|jd�}|rA|rA||d<qAq�q�W|
S(Ntautht.s!ignoring invalid [auth] key '%s'
itusernametcerttkeys://thttpitprefixtschemesthttpst*(R%R&skey(tdicttconfigitemstwarnRtrsplitt
setdefaultRt
expandpathtsplitRt	iteritemstgetRt
startswith(RturitusertconfigR'tvaltgrouptsettingtgdicttschemethostpathtbestusertbestlentbestauthR#R)tpR*((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pytreadauthforuri;sH	
$
tHTTPResponsecBseZd�ZRS(cCsdS(N((R((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyR	ms(R R!R	(((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyRElstHTTPConnectioncBseZeZdid�ZRS(cCsEt|t�r|jd�ntjj|||d|d|�dS(Nitbodytheaders(t
isinstanceRRRRFtrequest(RtmethodR7RGRH((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyRJrsN(R R!REtresponse_classRRJ(((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyRFpss-%(levelname)s:%(name)s:%(lineno)d:%(message)sthttp2handlercBsAeZd�Zd�Zd�Zd�Zd�Zdd�ZRS(cCs�tjj|�||_||_i|_|jdddd�}|r�tr�t	at
jd�}|jt
t
|j���t
j�}|jt
jt��|j|�ndS(NRthttp2debugleveltdefaultsmercurial.httpclient(turllib2tAbstractHTTPHandlerRRtpwmgrt_connectionsR9Rt_configuredloggingtTruetloggingt	getLoggertsetLeveltgetattrtuppert
StreamHandlertsetFormattert	FormattertLOGFMTt
addHandler(RRRRtlogleveltloggerthandler((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyRs			
cCsBx2|jj�D]!}x|D]}|j�qWqWi|_dS(s=Close and remove all connection objects being kept for reuse.N(RStvaluesR	(Rt	openconnstconn((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyt	close_all�s
cCs�t|dd
�}|j�}|r3|}|}nM|j�rz|j�}|j�jdd�djdd�d}nd
}|r�d|kr�|jdd�\}}nd}||f}nd
}|s�tjd��n|||f}	|j	j
|	g�}
g|
D]}|j�s|^q}|r<|d}
nu|
rY|jj
d	|�nd
}|jtjk	r}|j}n||d
|d|�}
|j	j|	g�j|
�t|j�}|j|j�td�|j�D��}y�|j�}d|kr0|jdd�djdd�d}n|ddkrMd|}n|
j|j�||j|�|
j�}Wn%tjk
r�}tj|��nX|j|_tj ||j|j!��}|j"|_#|j$|_%|S(s�Return an addinfourl object for the request, using http_class.

        http_class must implement the HTTPConnection API from httplib.
        The addinfourl return value is a file-like object.  It also
        has methods and attributes including:
            - info(): return a mimetools.Message object for the headers
            - geturl(): return the original request URL
            - code: HTTP status code
        t_tunnel_hosts://it/it:i8s
no host givens.all connections for %s busy, making a new one
ttimeouttproxy_hostportcss'|]\}}|j�|fVqdS(N(ttitle(t.0tnameR:((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pys	<genexpr>�sN(&RYRtget_hostt	has_proxytget_selectorR3R0RPtURLErrorRSR5tbusyRtdebugRjtsockett_GLOBAL_DEFAULT_TIMEOUTR1tappendR-RHtupdatetunredirected_hdrstitemsRJt
get_methodtdatatgetresponseterrorRtrecvturllibt
addinfourltget_full_urltstatustcodetreasontmsg(Rt
http_classtreqtuse_sslttunhostthostt	proxyhostt	proxyporttproxytconnkeytallconnstctconnsthRjRHtpathtrterrtresp((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pytdo_open�sb	/%
)
cCs>|j�jd�r"|j|�Sd�}|j||t�S(NR+c_s#t|�}t|d<t||�S(NR�(R-tFalseRF(RRtk2((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pytmakehttpcon�s
(R�R6t
https_openR�R�(RR�R�((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyt	http_open�s
	cCs�|j�}|jj|�\}}t|j||�}|rk|\}}||_|jjd|�n	d|_|j|j	|t
�S(Ns#using auth.%s.* for authentication
(R�RRtfind_stored_passwordRDRR#RtRR�t_makesslconnectionRU(RR�turlR8tpasswordtresR;R#((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyR��s		i�c
OsZd}d}|r$|jd�}n|r<|jd�}n|jr�d|jkr�d|jkr�|jd}|jd}nd|kr�d|ks�d|kr�|jdd�\}}t|�}d|kr�|dd!}q�n|r�||d	<n|r
||d
<n|jtj|j|��t	||dt
dtj|j|�|�}|S(
NiR'R&Rit[s]:ii����tkeyfiletcertfileR�t
ssl_validator(RtpopR#R0tintRxRt	sslkwargsRRFRUt	validator(RR�tportRRR�R�tcon((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyR�s.'
$

	(R R!RRfR�R�R�R�(((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyRM~s			S			(RVRuR�RPRt	mercurialRRRtmercurial.i18nRtobjectRRDRERFR�RTR^tHTTPHandlertHTTPSHandlerRM(((s>/usr/lib64/python2.7/site-packages/mercurial/httpconnection.pyt<module>
s%	1	

Anon7 - 2021