-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/bzrlib/transport/http/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/bzrlib/transport/http/_urllib.pyc

σ
’1Oc@@s‚ddlmZddlmZmZddlmZddlmZddl	m
Z
mZdejfd„ƒYZ
d„Zd	S(
i(tabsolute_import(terrorsttrace(thttp(thandle_response(tOpenertRequesttHttpTransport_urllibcB@sbeZdZdZeZd	d	d„Zd„Zd„Z	dd„Z
d„Zd„Zd„Z
RS(
s+Python urllib transport for http and https.icC@s\tt|ƒj|dd|ƒ|dk	r:|j|_n|jd|jd|ƒ|_dS(Nturllibt_from_transporttreport_activitytca_certs(tsuperRt__init__tNonet_openert
_opener_classt_report_activity(tselftbaseR	R((sA/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_urllib.pyR
)s	cC@s}|jƒ}|d	k	r@||_|jƒ\}}|jƒn|jƒ}tƒ}||_||_|j	dkr—d|j
|j|jƒfGHn|j
j|ƒ}|jƒ|jk	rΰ|j|j|j|jfƒn|j|j|jfƒ|j}|jtkrG|d
krGtj|jƒ|jd|dkƒ‚n|jd	k	rytjd|jƒ|jfƒn|S(smSend the request to the server and handles common errors.

        :returns: urllib2 Response object
        isperform: %s base: %s, url: %si-i.i/i3tis_permanentsredirected from: %s to: %sN(i-i.i/i3(t_get_connectionRt
connectiont_get_credentialstcleanup_pipet_create_authtdicttautht
proxy_autht_debugleveltmethodRtget_full_urlRtopent_set_connectiont_update_credentialstcodetfollow_redirectionstFalseRtRedirectRequestedt
redirected_toRtmutter(RtrequestRRRtresponseR#((sA/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_urllib.pyt_perform2s6	
					cC@s)|jƒ}|dk	r%|jƒndS(N(RRtclose(RR((sA/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_urllib.pyt
disconnectcsc
C@s-|j|ƒ}i}ddg}|s-|r|j||ƒ}|dk	r|jdƒ|jdƒ|jdƒd|}i|d6}qntd|d|d	|ƒ}	|j|	ƒ}
|
j}|dkrΰtj|ƒ‚n(|dkrtj	||d
|ƒ‚nt
|||
jƒ|
ƒ}||fS(
sSee HttpTransport._getiΘi”iΞii sbytes=tRangetGETtaccepted_errorssServer return code %dN(ii (t_remote_patht_attempted_range_headerRtappendRR+R#Rt
NoSuchFiletInvalidHttpRangeRtinfo(
Rtrelpathtoffsetsttail_amounttabspaththeadersR0trange_headertbytesR)R*R#tdata((sA/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_urllib.pyt_geths,



		c	C@sn|jdƒ}|jtd||idd6dddgƒƒ}|j}t|||jƒ|ƒ}||fS(Ns
.bzr/smarttPOSTsapplication/octet-streamsContent-TypeR0iΘi“(R1R+RR#RR6(Rt
body_bytesR:R*R#R>((sA/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_urllib.pyt_post†s
	cC@s=|j|ƒ}td|dddgƒ}|j|ƒ}|S(siRequest the HEAD of a file.

        Performs the request and leaves callers handle the results.
        tHEADR0iΘi”(R1RR+(RR7R:R)R*((sA/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_urllib.pyt_head’s
cC@s0|j|ƒ}|j}|dkr(tStSdS(s(Does the target location exist?
        iΘN(RDR#tTrueR%(RR7R*R#((sA/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_urllib.pythasžs
	N(t__name__t
__module__t__doc__RRRRR
R+R-R?RBRDRF(((sA/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_urllib.pyR s		1			c@s‰ddlm}m}t|jfg}|jjƒr…ddlm}m‰dtf‡‡fd†ƒY‰|j	ˆ|j
fƒn|S(s.Return the permutations to be used in testing.i(tfeaturesthttp_server(thttps_servert	ssl_certstHTTPS_urllib_transportc@seZd‡‡fd†ZRS(c@s/tˆ|ƒj|d|dˆjdƒƒdS(NR	Rsca.crt(RR
t
build_path(RRR	(RNRM(sA/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_urllib.pyR
ΉsN(RGRHRR
((RNRM(sA/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_urllib.pyRN·s(tbzrlib.testsRJRKRtHttpServer_urllibtHTTPSServerFeaturet	availableRLRMR3tHTTPSServer_urllib(RJRKtpermutationsRL((RNRMsA/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_urllib.pytget_test_permutationsͺs	N(t
__future__RtbzrlibRRtbzrlib.transportRtbzrlib.transport.http.responseRt'bzrlib.transport.http._urllib2_wrappersRRtHttpTransportBaseRRV(((sA/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_urllib.pyt<module>sŠ

Copyright © 2017 || Recoded By Mr.Bumblebee