Hacked By AnonymousFox

Current Path : /lib/python2.7/site-packages/pip/_vendor/cachecontrol/
Upload File :
Current File : //lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyc

�
��abc@srddlZddlZddlmZddlmZddlmZddlm	Z	defd��YZ
dS(	i����N(tHTTPAdapteri(tCacheController(t	DictCache(tCallbackFileWrappertCacheControlAdaptercBsPeZeddg�Zdedddd�Zd�Zed�Z	d�Z
RS(tPUTtDELETEc	Osbtt|�j||�|p%t�|_||_|p=t}||jd|d|�|_dS(Ntcache_etagst
serializer(tsuperRt__init__Rtcachet	heuristicRt
controller(	tselfRRtcontroller_classRRtargstkwtcontroller_factory((sD/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyR
s		cKs{|jdkr\|jj|�}|r=|j||dt�S|jj|jj|��ntt	|�j
||�}|S(s�
        Send a request. Use the request information to see if it
        exists in the cache and cache the response if we need to and can.
        tGETt
from_cache(tmethodR
tcached_requesttbuild_responsetTruetheaderstupdatetconditional_headersR	Rtsend(RtrequestRtcached_responsetresp((sD/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyRs	cs�|r|jdkr|jr4|jj|�}n|jdkr�|jj||�}||k	rmt}n|jdt�|j	�|}q|jdkr�|jj
||�qt|jt
j|jj
||��|_|jr|j��fd�}tj||�|_qntt|�j||�}|j|jkry|jry|jj|j�}|jj|�n||_|S(s�
        Build a response by making a request or using the cache.

        This will end up calling send and returning a potentially
        cached response
        Ri0tdecode_contenti-cs*��|jdkr&|jj�ndS(Ni(t
chunk_leftt_fpt_close(R(tsuper_update_chunk_length(sD/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyt_update_chunk_lengthgs(RRtapplytstatusR
tupdate_cached_responseRtreadtFalsetrelease_conntcache_responseRR"t	functoolstpartialtchunkedR%ttypest
MethodTypeR	RRtinvalidating_methodstokt	cache_urlturlRtdeleteR(RRtresponseRRR%RR4((R$sD/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyR3s<			
					cCs$|jj�tt|�j�dS(N(RtcloseR	R(R((sD/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyR8{s
N(t__name__t
__module__tsetR2tNoneRR
RR*RR8(((sD/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyRs
	H(R0R-tpip._vendor.requests.adaptersRR
RRRtfilewrapperRR(((sD/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyt<module>s

Hacked By AnonymousFox1.0, Coded By AnonymousFox