-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/mercurial/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/mercurial/httpconnection.pyc

ó
Ì\,Tc@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/lib/python2.7/dist-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/lib/python2.7/dist-packages/mercurial/httpconnection.pyR+s
(t__name__t
__module__t__doc__RR(((s</usr/lib/python2.7/dist-packages/mercurial/httpconnection.pyRs	
cCsItƒ}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/lib/python2.7/dist-packages/mercurial/httpconnection.pytreadauthforuri;sH	
$
tHTTPResponsecBseZd„ZRS(cCsdS(N((R((s</usr/lib/python2.7/dist-packages/mercurial/httpconnection.pyR	ms(R R!R	(((s</usr/lib/python2.7/dist-packages/mercurial/httpconnection.pyRElstHTTPConnectioncBseZeZdid„ZRS(cCsEt|tƒr|jdƒntjj|||d|d|ƒdS(Nitbodytheaders(t
isinstanceRRRRFtrequest(RtmethodR7RGRH((s</usr/lib/python2.7/dist-packages/mercurial/httpconnection.pyRJrsN(R R!REtresponse_classRRJ(((s</usr/lib/python2.7/dist-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/lib/python2.7/dist-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/lib/python2.7/dist-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/lib/python2.7/dist-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/lib/python2.7/dist-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/lib/python2.7/dist-packages/mercurial/httpconnection.pytmakehttpconìs
(R‚R6t
https_openR˜R™(RRˆR›((s</usr/lib/python2.7/dist-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/lib/python2.7/dist-packages/mercurial/httpconnection.pyRœòs		i»cOsQd}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||d	<||d
<|jtj|j|ƒƒt	||dt
dtjd
tj|j|ƒ|}|S(NiR'R&Rit[s]:iiÿÿÿÿtkeyfiletcertfileR‰tssl_wrap_sockett
ssl_validator(
RtpopR#R0tintRxRt	sslkwargsRRFRUR¦t	validator(RR‹tportRRR¤R¥tcon((s</usr/lib/python2.7/dist-packages/mercurial/httpconnection.pyRŸs,'
$

		(R R!RRfR˜RRœRŸ(((s</usr/lib/python2.7/dist-packages/mercurial/httpconnection.pyRM~s			S			(RVRuR€RPRt	mercurialRRRtmercurial.i18nRtobjectRRDRERFR™RTR^tHTTPHandlertHTTPSHandlerRM(((s</usr/lib/python2.7/dist-packages/mercurial/httpconnection.pyt<module>
s%	1	

Copyright © 2017 || Recoded By Mr.Bumblebee