ronnie
2022-10-14 1504bb53e29d3d46222c0b3ea994fc494b48e153
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
M\¬Qc@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZyddlmZWn!ek
råddlmZnXddlmZmZmZmZmZmZmZmZmZmZmZmZmZm Z ddlm!Z!m"Z"m#Z#m$Z$e
j%d Z&da(de    j)d„Z*d„Z+d    e,fd
„ƒYZ-d e-efd „ƒYZ.ej/d ƒZ0d„Z1ddDd„ƒYZ2ddEd„ƒYZ3d„Z4ddFd„ƒYZ5de5fd„ƒYZ6de5fd„ƒYZ7de5fd„ƒYZ8d„Z9de5fd„ƒYZ:ddGd „ƒYZ;d!e;fd"„ƒYZ<d#dHd$„ƒYZ=d%e=e5fd&„ƒYZ>d'e=e5fd(„ƒYZ?d)„Z@d*dId+„ƒYZAd,e5eAfd-„ƒYZBd.e5eAfd/„ƒYZCd0e5fd1„ƒYZDd2eDfd3„ƒYZEeFed4ƒrŽd5eDfd6„ƒYZGnd7e5fd8„ƒYZHd9e5fd:„ƒYZId;„ZJd<„ZKd=„ZLd>e5fd?„ƒYZMd@e5fdA„ƒYZNdBeNfdC„ƒYZOdS(Js! An extensible library for opening URLs using a variety of protocols
 
The simplest way to use this module is to call the urlopen function,
which accepts a string containing a URL or a Request object (described
below).  It opens the URL and returns the results as file-like
object; the returned object has some extra methods described below.
 
The OpenerDirector manages a collection of Handler objects that do
all the actual work.  Each Handler implements a particular protocol or
option.  The OpenerDirector is a composite object that invokes the
Handlers needed to open the requested URL.  For example, the
HTTPHandler performs HTTP GET and POST requests and deals with
non-error returns.  The HTTPRedirectHandler automatically deals with
HTTP 301, 302, 303 and 307 redirect errors, and the HTTPDigestAuthHandler
deals with digest authentication.
 
urlopen(url, data=None) -- Basic usage is the same as original
urllib.  pass the url and optionally data to post to an HTTP URL, and
get a file-like object back.  One difference is that you can also pass
a Request instance instead of URL.  Raises a URLError (subclass of
IOError); for HTTP errors, raises an HTTPError, which can also be
treated as a valid response.
 
build_opener -- Function that creates a new OpenerDirector instance.
Will install the default handlers.  Accepts one or more Handlers as
arguments, either instances or Handler classes that it will
instantiate.  If one of the argument is a subclass of the default
handler, the argument will be installed instead of the default.
 
install_opener -- Installs a new opener as the default opener.
 
objects of interest:
 
OpenerDirector -- Sets up the User Agent as the Python-urllib client and manages
the Handler classes, while dealing with requests and responses.
 
Request -- An object that encapsulates the state of a request.  The
state can be as simple as the URL.  It can also include extra HTTP
headers, e.g. a User-Agent.
 
BaseHandler --
 
exceptions:
URLError -- A subclass of IOError, individual protocols have their own
specific subclass.
 
HTTPError -- Also a valid HTTP response, so you can treat an HTTP error
as an exceptional event or valid response.
 
internals:
BaseHandler and parent
_call_chain conventions
 
Example usage:
 
import urllib2
 
# set up authentication info
authinfo = urllib2.HTTPBasicAuthHandler()
authinfo.add_password(realm='PDQ Application',
                      uri='https://mahler:8092/site-updates.py',
                      user='klem',
                      passwd='geheim$parole')
 
proxy_support = urllib2.ProxyHandler({"http" : "http://ahad-haam:3128"})
 
# build a new opener that adds authentication and caching FTP handlers
opener = urllib2.build_opener(proxy_support, authinfo, urllib2.CacheFTPHandler)
 
# install it
urllib2.install_opener(opener)
 
f = urllib2.urlopen('http://www.python.org/')
 
 
iÿÿÿÿN(tStringIO(tunwraptunquotet    splittypet    splithosttquotet
addinfourlt    splitporttsplittagttoBytest    splitattrt
ftpwrappert    splitusert splitpasswdt
splitvalue(t    localhostt url2pathnamet
getproxiest proxy_bypassicCs+tdkrtƒantj|||ƒS(N(t_openertNonet build_openertopen(turltdatattimeout((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyturlopen{s  cCs
|adS(N(R(topener((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytinstall_openerstURLErrorcBseZd„Zd„ZRS(cCs|f|_||_dS(N(targstreason(tselfR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt__init__s cCs d|jS(Ns<urlopen error %s>(R(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt__str__“s(t__name__t
__module__R!R"(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR‰s    t    HTTPErrorcBsAeZdZejZd„Zd„Zed„ƒZd„Z    RS(sBRaised when HTTP error occurs, but also acts like non-error returncCsV||_||_||_||_||_|dk    rR|j||||ƒndS(N(tcodetmsgthdrstfptfilenameRt_HTTPError__super_init(R RR&R'R(R)((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR!šs                     cCsd|j|jfS(NsHTTP Error %s: %s(R&R'(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR"§scCs|jS(N(R'(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR¬scCs|jS(N(R((R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytinfo°s(
R#R$t__doc__RR!R+R"tpropertyRR,(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR%–s             s:\d+$cCs_|jƒ}tj|ƒd}|dkr@|jddƒ}ntjd|dƒ}|jƒS(sˆReturn request-host, as defined by RFC 2965.
 
    Variation from RFC: returned value is lowercased, for convenient
    comparison.
 
    ittHost(t get_full_urlturlparset
get_headert _cut_port_retsubtlower(trequestRthost((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt request_hostµs   tRequestcBsÂeZdided„Zd„Zd„Zd„Zd„Zd„Z    d„Z
d„Z d„Z d    „Z d
„Zd „Zd „Zd „Zd„Zd„Zd„Zdd„Zd„ZRS(cCsÇt|ƒ|_t|jƒ\|_|_d|_d|_d|_d|_||_    i|_
x*|j ƒD]\}}|j ||ƒqmWi|_ |dkr±t|ƒ}n||_||_dS(N(Rt_Request__originalRt_Request__fragmentRttypeR8tportt _tunnel_hostRtheaderstitemst
add_headertunredirected_hdrsR9torigin_req_hostt unverifiable(R RRR@RDREtkeytvalue((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR!Çs                                 cCs^|d dkrQ|d}ttd|ƒrQt|d|ƒƒt||ƒSnt|‚dS(Ni t _Request__r_tget_(thasattrR:tgetattrtAttributeError(R tattrtname((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt __getattr__Ûs 
cCs|jƒrdSdSdS(NtPOSTtGET(thas_data(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt
get_methodçs cCs ||_dS(N(R(R R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytadd_dataïscCs |jdk    S(N(RR(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRRòscCs|jS(N(R(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytget_dataõscCs(|jrd|j|jfS|jSdS(Ns%s#%s(R<R;(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR1øs    cCsV|jdkrOt|jƒ\|_|_|jdkrOtd|j‚qOn|jS(Nsunknown url type: %s(R=RRR;t_Request__r_typet
ValueError(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytget_typeþs
cCsR|jdkrKt|jƒ\|_|_|jrKt|jƒ|_qKn|jS(N(R8RRRVt_Request__r_hostR(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytget_hosts
    cCs|jS(N(RY(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt get_selector scCsJ|jdkr(|j r(|j|_n||_|j|_||_dS(Nthttps(R=R?R8R;RY(R R8R=((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt    set_proxys
     cCs|j|jkS(N(RYR;(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt    has_proxyscCs|jS(N(RD(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytget_origin_req_hostscCs|jS(N(RE(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytis_unverifiablescCs||j|jƒ<dS(N(R@t
capitalize(R RFtval((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRB!scCs||j|jƒ<dS(N(RCRa(R RFRb((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytadd_unredirected_header%scCs||jkp||jkS(N(R@RC(R t header_name((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt
has_header)scCs"|jj||jj||ƒƒS(N(R@tgetRC(R Rdtdefault((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR3-s    cCs)|jjƒ}|j|jƒ|jƒS(N(RCtcopytupdateR@RA(R R(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt header_items2sN(R#R$RtFalseR!RORSRTRRRUR1RXRZR[R]R^R_R`RBRcReR3Rj(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR:Ås(                                                                     tOpenerDirectorcBsSeZd„Zd„Zd„Zd„Zdejd„Z    dd„Z
d„Z RS(cCsMdt}d|fg|_g|_i|_i|_i|_i|_dS(NsPython-urllib/%ss
User-agent(t __version__t
addheadersthandlerst handle_opent handle_errortprocess_responsetprocess_request(R tclient_version((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR!8s
                c CsÃt|dƒs(tdt|ƒƒ‚nt}xet|ƒD]W}|d krSq;n|jdƒ}|| }||d}|jdƒr÷|jdƒ|d}||d}yt|ƒ}Wntk
rÑnX|j    j
|iƒ}    |    |j    |<n]|d    kr|}|j }    n?|d
kr3|}|j }    n!|d kr;|}|j }    nq;|    j|gƒ}
|
rtj|
|ƒn |
j|ƒt}q;W|r¿tj|j|ƒ|j|ƒndS( Nt
add_parents%expected BaseHandler instance, got %rtredirect_requesttdo_opent
proxy_opent_iterrorRtresponseR7(sredirect_requestsdo_opens
proxy_open(RJt    TypeErrorR=Rktdirtfindt
startswithtintRWRqRfRpRrRst
setdefaulttbisecttinsorttappendtTrueRoRu( R thandlertaddedtmethtitprotocolt    conditiontjtkindtlookupRo((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt add_handlerCsJ 
 
cCsdS(N((R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytclosersc    GsR|j|dƒ}x9|D]1}t||ƒ}||Œ}|dk    r|SqWdS(N((RfRKR(    R tchainRt    meth_nameRRoR†tfunctresult((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt _call_chainvs    c
Csût|tƒr!t||ƒ}n"|}|dk    rC|j|ƒn||_|jƒ}|d}x8|jj|gƒD]!}t    ||ƒ}||ƒ}qxW|j
||ƒ}    |d}x;|j j|gƒD]$}t    ||ƒ}|||    ƒ}    qÏW|    S(Nt_requestt    _response( t
isinstancet
basestringR:RRTRRXRsRfRKt_openRr(
R tfullurlRRtreqRŠR’t    processorRˆR{((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR‚s"      
 
cCss|j|jdd|ƒ}|r%|S|jƒ}|j|j||d|ƒ}|rZ|S|j|jdd|ƒS(NRgt default_openRštunknownt unknown_open(R•RpRX(R RœRR”RŠ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRšžs   cGs«|d
kr<|jd}|d}d|}d}|}n|j}|d}d}|||f|}|j|Œ}|r|S|r§|dd    f|}|j|ŒSdS( NthttpR\is http_error_%sit_erroriRgthttp_error_default(R¡shttps(RqR•(R tprotoRtdictR’thttp_errt    orig_argsR”((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRz­s   
 
        
N( R#R$R!RRR•Rtsockett_GLOBAL_DEFAULT_TIMEOUTRRšRz(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRl7s        /          csRddl‰‡fd†}tƒ}tttttttt    g}t
t dƒra|j t ƒntƒ}xl|D]d}x[|D]S}||ƒr²t||ƒrÑ|j|ƒqÑq~t||ƒr~|j|ƒq~q~WqqWx|D]}|j|ƒqàWx|D]}|j|ƒƒqþWx3|D]+}||ƒr=|ƒ}n|j|ƒqW|S(s+Create an opener object from a list of handlers.
 
    The opener will use several default handlers, including support
    for HTTP, FTP and when applicable, HTTPS.
 
    If any of the handlers passed as arguments are subclasses of the
    default handlers, the default handlers will not be used.
    iÿÿÿÿNcst|ˆjtfƒS(N(R˜t    ClassTypeR=(tobj(ttypes(sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytisclassÐstHTTPS(R¬Rlt ProxyHandlertUnknownHandlert HTTPHandlertHTTPDefaultErrorHandlertHTTPRedirectHandlert
FTPHandlert FileHandlertHTTPErrorProcessorRJthttplibR„t HTTPSHandlertsett
issubclasstaddR˜tremoveR(RoR­Rtdefault_classestskiptklasstcheckth((R¬sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRÆs2                         t BaseHandlercBs)eZdZd„Zd„Zd„ZRS(iôcCs ||_dS(N(tparent(R RÃ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRuðscCsdS(N((R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRóscCs#t|dƒstS|j|jkS(Nt handler_order(RJR…RÄ(R tother((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt__lt__÷s(R#R$RÄRuRRÆ(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRÂís        R¶cBs#eZdZdZd„ZeZRS(sProcess HTTP error responses.iècCsd|j|j|jƒ}}}d|ko7dkns`|jjd|||||ƒ}n|S(NiÈi,R¡(R&R'R,RÃRz(R R7R{R&R'R(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt http_responses
     (R#R$R-RÄRÇthttps_response(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR¶s     R²cBseZd„ZRS(cCs"t|jƒ||||ƒ‚dS(N(R%R1(R RœR)R&R'R(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR£s(R#R$R£(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR²sR³cBs:eZdZdZd„Zd„ZeZZZdZ    RS(ii
c     Cs±|jƒ}|dkr$|dks<|dkr|dkr|jdd    ƒ}td
„|jjƒDƒƒ}t|d |d |jƒd tƒSt|j    ƒ||||ƒ‚dS(s­Return a Request or None in response to a redirect.
 
        This is called by the http_error_30x methods when a
        redirection response is received.  If a redirection should
        take place, return a new Request to allow http_error_30x to
        perform the redirect.  Otherwise, raise HTTPError if no-one
        else should try to handle this url.  Return None if you can't
        but another Handler might.
        i-i.i/i3RQtHEADRPt s%20css3|])\}}|jƒdkr||fVqdS(scontent-lengths content-typeN(scontent-lengths content-type(R6(t.0tktv((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pys    <genexpr>1s    R@RDREN(i-i.i/i3(sGETRÉ(i-i.i/(
RStreplaceR¥R@RAR:R_R…R%R1(    R RœR)R&R'R@tnewurltmt
newheaders((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRvs
     c    Csÿd|kr"|jdƒd}n&d|krD|jdƒd}ndStj|ƒ}|jsyt|ƒ}d|d<ntj|ƒ}tj|jƒ|ƒ}|jƒ}|jdƒpÖ|jdƒpÖ|jdƒsüt    |||d    |||ƒ‚n|j
||||||ƒ}    |    dkr*dSt |d
ƒr¤|j }
|    _ |
j|dƒ|jksyt|
ƒ|jkr¸t    |jƒ||j|||ƒ‚q¸ni}
|    _ |_ |
j|dƒd |
|<|jƒ|jƒ|jj|    d |jƒS( Ntlocationiturit/ishttp://shttps://sftp://s) - Redirection to url '%s' is not allowedt redirect_dictiR(t
getheadersR2tpathtlistt
urlunparseturljoinR1R6RR%RvRRJRÕRft max_repeatstlentmax_redirectionstinf_msgtreadRRÃRR( R RœR)R&R'R@RÏturlpartst newurl_lowertnewtvisited((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pythttp_error_302?sB              
 
soThe HTTP server returned a redirect error that would lead to an infinite loop.
The last 30x error message was:
(
R#R$RÛRÝRvRäthttp_error_301thttp_error_303thttp_error_307RÞ(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR³s     "    8c    CsÓt|ƒ\}}|jdƒs0d}|}nV|jdƒsRtd|ƒ‚n|jddƒ}|dkryd}n|d|!}t|ƒ\}}|dk    r¹t|ƒ\}}n
d}}||||fS(s3Return (scheme, user, password, host/port) given a URL or an authority.
 
    If a URL is supplied, it must have an authority (host:port) component.
    According to RFC 3986, having an authority component means the URL must
    have two slashes after the scheme:
 
    >>> _parse_proxy('file:/ftp.example.com/')
    Traceback (most recent call last):
    ValueError: proxy URL with no authority: 'file:/ftp.example.com/'
 
    The first three items of the returned tuple may be None.
 
    Examples of authority parsing:
 
    >>> _parse_proxy('proxy.example.com')
    (None, None, None, 'proxy.example.com')
    >>> _parse_proxy('proxy.example.com:3128')
    (None, None, None, 'proxy.example.com:3128')
 
    The authority component may optionally include userinfo (assumed to be
    username:password):
 
    >>> _parse_proxy('joe:password@proxy.example.com')
    (None, 'joe', 'password', 'proxy.example.com')
    >>> _parse_proxy('joe:password@proxy.example.com:3128')
    (None, 'joe', 'password', 'proxy.example.com:3128')
 
    Same examples, but with URLs instead:
 
    >>> _parse_proxy('http://proxy.example.com/')
    ('http', None, None, 'proxy.example.com')
    >>> _parse_proxy('http://proxy.example.com:3128/')
    ('http', None, None, 'proxy.example.com:3128')
    >>> _parse_proxy('http://joe:password@proxy.example.com/')
    ('http', 'joe', 'password', 'proxy.example.com')
    >>> _parse_proxy('http://joe:password@proxy.example.com:3128')
    ('http', 'joe', 'password', 'proxy.example.com:3128')
 
    Everything after the authority is ignored:
 
    >>> _parse_proxy('ftp://joe:password@proxy.example.com/rubbish:3128')
    ('ftp', 'joe', 'password', 'proxy.example.com')
 
    Test for no trailing '/' case:
 
    >>> _parse_proxy('http://joe:password@proxy.example.com')
    ('http', 'joe', 'password', 'proxy.example.com')
 
    RÔs//sproxy URL with no authority: %riiÿÿÿÿN(RRRRWR~R R (    tproxytschemetr_schemet    authoritytendtuserinfothostporttusertpassword((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt _parse_proxy~s2           
R¯cBs#eZdZdd„Zd„ZRS(idcCse|dkrtƒ}n||_x=|jƒD]/\}}t|d||||jd„ƒq.WdS(Ns%s_opencSs||||ƒS(N((trRèR=Rˆ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt<lambda>Ñs(RRtproxiesRAtsetattrRx(R RôR=R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR!Ês        c Csþ|jƒ}t|ƒ\}}}}|dkr9|}n|jrUt|jƒrUdS|r©|r©dt|ƒt|ƒf}    tj|    ƒjƒ}
|j    dd|
ƒnt|ƒ}|j
||ƒ||ksÝ|dkrádS|j j |d|j ƒSdS(Ns%s:%ssProxy-authorizationsBasic R\R(RXRñRR8RRtbase64t    b64encodetstripRBR]RÃRR( R RœRèR=t    orig_typet
proxy_typeRïRðRît    user_passtcreds((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRxÔs        N(R#R$RÄRR!Rx(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR¯Æs
tHTTPPasswordMgrcBs8eZd„Zd„Zd„Zed„Zd„ZRS(cCs i|_dS(N(tpasswd(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR!óscCs—t|tƒr|g}n||jkr:i|j|<nxVttfD]H}tg|D]}|j||ƒ^qWƒ}||f|j||<qGWdS(N(R˜R™RþR…Rkttuplet
reduce_uri(R trealmRÓRïRþt default_porttut reduced_uri((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt add_passwordös (c    Cs†|jj|iƒ}xjttfD]\}|j||ƒ}xA|jƒD]3\}}x$|D]}|j||ƒrZ|SqZWqGWq"WdS(N(NN(RþRfR…RkRt    iteritemst    is_suburiR(    R RtauthuritdomainsRtreduced_authurituristauthinfoRÓ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytfind_user_passwords c
CsËtj|ƒ}|dr@|d}|d}|dp:d}nd
}|}d}t|ƒ\}}|rÁ|d
krÁ|d
k    rÁidd6dd6j|ƒ}    |    d
k    rÁd    ||    f}qÁn||fS( s@Accept authority or URI and extract only the authority and path.iiiRÔiPR¡i»R\s%s:%dN(R2turlsplitRRRf(
R RÓRtpartsRéRëR×R8R>tdport((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR s 
 
 
 
 
     cCsi||krtS|d|dkr(tStj|d|dfƒ}t|ƒt|dƒkretStS(scCheck if test is below base in a URI tree
 
        Both args must be URIs in reduced form.
        ii(R…Rkt    posixpatht commonprefixRÜ(R tbasettesttcommon((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR"s (R#R$R!RR R…RR(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRýñs
            
tHTTPPasswordMgrWithDefaultRealmcBseZd„ZRS(cCsDtj|||ƒ\}}|dk    r1||fStj|d|ƒS(N(RýR R(R RRRïRð((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR 3s
 
(R#R$R (((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR1stAbstractBasicAuthHandlercBsDeZejdejƒZdd„Zd„Zd„Z    d„Z
RS(s1(?:.*,)*[     ]*([^     ]+)[     ]+realm=(["']?)([^"']*)\2cCs=|dkrtƒ}n||_|jj|_d|_dS(Ni(RRýRþRtretried(R t password_mgr((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR!Is
      cCs d|_dS(Ni(R(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytreset_retry_countPsc
Csü|j|dƒ}|jdkrBt|jƒdd|dƒ‚n|jd7_|røtjj|ƒ}|rø|jƒ\}}}|d kr¦t    j
dt dƒn|j ƒd    krõ|j |||ƒ}    |    rî|    jdkrîd
|_n|    SqøndS( Nii‘sbasic auth failedit"t'sBasic Auth Realm was unquoteditbasici(RR(RfRRR%R1Rtrxtsearchtgroupstwarningstwarnt UserWarningR6tretry_http_basic_authR&(
R tauthreqR8RœR@tmoRéRRR{((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pythttp_error_auth_reqedSs"       cCs¦|jj||ƒ\}}|dk    ržd||f}dtj|ƒjƒ}|jj|jdƒ|krrdS|j    |j|ƒ|j
j |d|j ƒSdSdS(Ns%s:%ssBasic %sR( RþR RRöR÷RøR@Rft auth_headerRcRÃRR(R R8RœRRïtpwtrawtauth((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR$ms N( R#R$tretcompiletIRRR!RR'R$(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR;s               tHTTPBasicAuthHandlercBseZdZd„ZRS(t AuthorizationcCs2|jƒ}|jd|||ƒ}|jƒ|S(Nswww-authenticate(R1R'R(R RœR)R&R'R@RR{((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pythttp_error_401~s
     
(R#R$R(R1(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR/zstProxyBasicAuthHandlercBseZdZd„ZRS(sProxy-authorizationcCs2|jƒ}|jd|||ƒ}|jƒ|S(Nsproxy-authenticate(RZR'R(R RœR)R&R'R@RëR{((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pythttp_error_407Šs
     
(R#R$R(R3(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR2†scCs}tjjdƒr;tdƒ}|j|ƒ}|jƒ|Sgt|ƒD]}ttj    ddƒƒ^qH}dj
|ƒSdS(sReturn n random bytes.s /dev/urandomiiR/N( tosR×texistsRRßRtrangetchrtrandomt    randrangetjoin(tntftsR‰tL((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt randombytes–s 
1tAbstractDigestAuthHandlercBsSeZdd„Zd„Zd„Zd„Zd„Zd„Zd„Z    d„Z
RS(    cCsO|dkrtƒ}n||_|jj|_d|_d|_d|_dS(Ni(RRýRþRRt nonce_countt
last_nonce(R Rþ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR!¯s              cCs d|_dS(Ni(R(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR¸scCs|j|dƒ}|jdkrBt|jƒdd|dƒ‚n|jd7_|rŒ|jƒd}|jƒdkrŒ|j||ƒSndS(Nii‘sdigest auth failediitdigest(RfRRR%R1tsplitR6tretry_http_digest_auth(R R(R8RœR@R%Ré((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR'»scCs¤|jddƒ\}}tt|ƒƒ}|j||ƒ}|r d|}|jj|jdƒ|krndS|j|j|ƒ|j    j
|d|j ƒ}|SdS(NRÊis    Digest %sR( RDtparse_keqv_listtparse_http_listtget_authorizationR@RfR(RRcRÃRR(R RœR+ttokent    challengetchaltauth_valtresp((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyREÌs
cCs<tjd|j|tjƒtdƒfƒjƒ}|d S(Ns %s:%s:%s:%sii(thashlibtsha1RAttimetctimeR?t    hexdigest(R tnoncetdig((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt
get_cnonceØscCsdyK|d}|d}|jdƒ}|jddƒ}|jddƒ}Wntk
r_dSX|j|ƒ\}}    |dkr…dS|jj||jƒƒ\}
} |
dkr¶dS|jƒrÝ|j|j    ƒ|ƒ} nd} d|
|| f} d|j
ƒ|j ƒf}|d    kr¤||j kr?|j d
7_ nd
|_ ||_ d |j }|j|ƒ}d ||||||ƒf}|    || ƒ|ƒ}nD|dkrØ|    || ƒd|||ƒfƒ}ntd |ƒ‚d|
|||j ƒ|f}|r|d|7}n| r5|d| 7}n|d|7}|r`|d||f7}n|S(NRRStqopt    algorithmtMD5topaques%s:%s:%ss%s:%sR+is%08xs%s:%s:%s:%s:%ssqop '%s' is not supported.s>username="%s", realm="%s", nonce="%s", uri="%s", response="%s"s , opaque="%s"s , digest="%s"s, algorithm="%s"s, qop=auth, nc=%s, cnonce="%s"(RfRtKeyErrortget_algorithm_implsRþR R1RRtget_entity_digestRURSR[RBRARUR(R RœRKRRSRVRWRYtHtKDRïR)tentdigtA1tA2tncvaluetcnoncetnoncebittrespdigR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRHâsV
 
  !              (
csU|jƒ}|dkr$d„‰n|dkr<d„‰n‡fd†}ˆ|fS(NRXcSstj|ƒjƒS(N(RNtmd5RR(tx((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRó$stSHAcSstj|ƒjƒS(N(RNRORR(Rg((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRó&scsˆd||fƒS(Ns%s:%s((R=td(R](sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRó(s(tupper(R RWR^((R]sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR[s     cCsdS(N(R(R RRK((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR\+sN( R#R$RR!RR'RERURHR[R\(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR@¤s                    
   =     tHTTPDigestAuthHandlercBs#eZdZdZdZd„ZRS(s¨An authentication protocol defined by RFC 2069
 
    Digest authentication improves on basic authentication because it
    does not transmit passwords in the clear.
    R0iêcCs?tj|jƒƒd}|jd|||ƒ}|jƒ|S(Niswww-authenticate(R2R1R'R(R RœR)R&R'R@R8tretry((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR1:s
    
(R#R$R-R(RÄR1(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRk0stProxyDigestAuthHandlercBseZdZdZd„ZRS(sProxy-AuthorizationiêcCs2|jƒ}|jd|||ƒ}|jƒ|S(Nsproxy-authenticate(RZR'R(R RœR)R&R'R@R8Rl((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR3Gs
     
(R#R$R(RÄR3(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRmBstAbstractHTTPHandlercBs/eZdd„Zd„Zd„Zd„ZRS(icCs ||_dS(N(t _debuglevel(R t
debuglevel((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR!PscCs ||_dS(N(Ro(R tlevel((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytset_http_debuglevelSsc
Cs:|jƒ}|s!tdƒ‚n|jƒrŠ|jƒ}|jdƒs[|jddƒn|jdƒsŠ|jddt|ƒƒqŠn|}|jƒrÉt|j    ƒƒ\}}t
|ƒ\}}n|jdƒsë|jd|ƒnxH|j j D]:\}}    |j ƒ}|j|ƒsø|j||    ƒqøqøW|S(Ns no host givens Content-types!application/x-www-form-urlencodedsContent-lengths%dR0(RZRRRRUReRcRÜR^RR[RRÃRnRa(
R R7R8Rtsel_hostRétseltsel_pathRNRG((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt do_request_Vs.   
  c sß|jƒ}|s!tdƒ‚n||d|jƒ}|j|jƒt|jƒ‰ˆjt‡fd†|jj    ƒDƒƒƒdˆd<td„ˆj    ƒDƒƒ‰|j
rùi}d}|ˆkràˆ|||<ˆ|=n|j |j
d|ƒny)|j |j ƒ|jƒ|jˆƒWn,tjk
rP}|jƒt|ƒ‚n7Xy|jd    tƒ}Wntk
r†|jƒ}nX|j|_tj|dtƒ}    t|    |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
        s no host givenRc3s-|]#\}}|ˆkr||fVqdS(N((RËRÌRÍ(R@(sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pys    <genexpr>…s    Rt
Connectioncss'|]\}}|jƒ|fVqdS(N(ttitle(RËRNRb((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pys    <genexpr>ssProxy-AuthorizationR@t    buffering(RZRRtset_debuglevelRoR¥RCRiR@RAR?t
set_tunnelR7RSR[RR¨RzRt getresponseR…R|Rßtrecvt _fileobjectRR'R1tstatusR&R( R t
http_classRœR8RÁttunnel_headerstproxy_auth_hdrterrRòR)RM((R@sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRwss@
,    
     
)
    (R#R$R!RrRvRw(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRnNs         R±cBseZd„ZejZRS(cCs|jtj|ƒS(N(RwR·tHTTPConnection(R Rœ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt    http_open½s(R#R$R…RnRvt http_request(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR±»s    R®R¸cBseZd„ZejZRS(cCs|jtj|ƒS(N(RwR·tHTTPSConnection(R Rœ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt
https_openÅs(R#R$RˆRnRvt https_request(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR¸Ãs    tHTTPCookieProcessorcBs2eZdd„Zd„Zd„ZeZeZRS(cCs4ddl}|dkr'|jƒ}n||_dS(Niÿÿÿÿ(t    cookielibRt    CookieJart    cookiejar(R RR‹((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR!Ës  cCs|jj|ƒ|S(N(Rtadd_cookie_header(R R7((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR†ÑscCs|jj||ƒ|S(N(Rtextract_cookies(R R7R{((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRÇÕsN(R#R$RR!R†RÇR‰RÈ(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRŠÊs
         R°cBseZd„ZRS(cCs |jƒ}td|ƒ‚dS(Nsunknown url type: %s(RXR(R RœR=((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR Ýs (R#R$R (((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR°ÜscCsmi}x`|D]X}|jddƒ\}}|ddkr[|ddkr[|dd!}n|||<q W|S(s>Parse list of key=value strings where keys are not duplicated.t=iiRiÿÿÿÿ(RD(tltparsedteltRÌRÍ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRFás  cCsýg}d}t}}x±|D]©}|r?||7}t}qn|r‚|dkr]t}qn|dkrrt}n||7}qn|dkr§|j|ƒd}qn|dkr¼t}n||7}qW|rà|j|ƒng|D]}|jƒ^qçS(spParse lists as described by RFC 2068 Section 2.
 
    In particular, parse comma-separated lists where the elements of
    the list may include quoted-strings.  A quoted-string could
    contain a comma.  A non-quoted string could have quotes in the
    middle.  Neither commas nor quotes count if they are escaped.
    Only double-quotes count, not single-quotes.
    R/s\Rt,(RkR…R„Rø(R=trestparttescapeRtcur((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRGës4    
 
      
       cCs-ytj|ƒSWntjk
r(dSXdS(N(R¨t gethostbynametgaierrorR(R8((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt_safe_gethostbynamesRµcBs)eZd„ZdZd„Zd„ZRS(cCsq|jƒ}|d dkr`|dd!dkr`|jr`|jdkr`d|_|jj|ƒS|j|ƒSdS(Nis//iRÔRtftp(R[R8R=RÃRtopen_local_file(R RœR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt    file_opens  ,    cCs|tjdkruy7ttjdƒdtjtjƒƒdƒt_Wqutjk
rqtjdƒft_quXntjS(NRi(    RµtnamesRRÿR¨tgethostbyname_ext gethostnameRšR™(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt    get_names)s$cCs[ddl}ddl}|jƒ}|jƒ}t|ƒ}yítj|ƒ}|j}|jj    |j
dt ƒ}    |j |ƒd}
t jtd|
pšd||    fƒƒ} |rÈt|ƒ\}} n| sî| r(t|ƒ|jƒkr(|rd||} n
d|} tt|dƒ| | ƒSWntk
rJ}t|ƒ‚nXtdƒ‚dS(    Niÿÿÿÿtusegmtis6Content-type: %s
Content-length: %d
Last-modified: %s
s
text/plainsfile://trbsfile not on local host(t email.utilst    mimetypesRZR[RR4tstattst_sizetutilst
formatdatetst_mtimeR…t
guess_typet    mimetoolstMessageRRR›R¢RRtOSErrorR(R RœtemailR¦R8R*t    localfiletstatstsizetmodifiedtmtypeR@R>torigurlR'((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR4s0             
N(R#R$RžRRŸR¢R(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRµs    
     R´cBseZd„Zd„ZRS(cCsÍddl}ddl}|jƒ}|s9tdƒ‚nt|ƒ\}}|dkrc|j}n t|ƒ}t|ƒ\}}|rœt    |ƒ\}}nd}t
|ƒ}|p·d}|pÃd}yt j |ƒ}Wn"t j k
rý}t|ƒ‚nXt|jƒƒ\}    }
|    jdƒ} tt
| ƒ} | d | d} } | rg| d rg| d} ny/|j||||| |jƒ} | r—dpšd}xM|
D]E}t|ƒ\}}|jƒd    kr¤|dkr¤|jƒ}q¤q¤W| j| |ƒ\}}d}|j|jƒƒd}|r;|d|7}n|dk    rd|dkrd|d|7}nt|ƒ}tj|ƒ}t|||jƒƒSWn0|jk
rÈ}td|tj ƒd‚nXdS(Niÿÿÿÿsftp error: no host givenR/RÔiiR.tDR=tatAR‰RisContent-type: %s
sContent-length: %d
s ftp error: %si(R¸R¹R‰R.RiR·(!tftplibR¦RZRRRtFTP_PORTR€R R RR¨R™RzR
R[RDtmapt connect_ftpRRR6RjtretrfileR¬R1RR­R®Rt
all_errorstsystexc_info(R RœRºR¦R8R>RïRþR'R×tattrstdirstfiletfwR=RMRGR)tretrlenR@Rµtsf((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pytftp_openQs\          !   c    Cs%t||||||dtƒ}|S(Nt
persistent(R Rk(R RïRþR8R>RÃRRÅ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR½†s    (R#R$RÈR½(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR´Ps    5tCacheFTPHandlercBs>eZd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs1i|_i|_d|_d|_d|_dS(Nii<i(tcacheRtsoonesttdelayt    max_conns(R ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR!s
                cCs ||_dS(N(RÍ(R tt((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt
setTimeout–scCs ||_dS(N(RÎ(R RÐ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt setMaxConns™scCs›|||dj|ƒ|f}||jkrJtjƒ|j|j|<n<t||||||ƒ|j|<tjƒ|j|j|<|jƒ|j|S(NRÔ(R:RËRPRÍRR t check_cache(R RïRþR8R>RÃRRF((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyR½œs"
cCstjƒ}|j|krrxT|jjƒD]@\}}||kr+|j|jƒ|j|=|j|=q+q+Wnt|jjƒƒ|_t|jƒ|j    krxD|jjƒD]3\}}||jkr²|j|=|j|=Pq²q²Wt|jjƒƒ|_ndS(N(
RPRÌRRARËRtmintvaluesRÜRÎ(R RÏRÌRÍ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRÒ¦s  
 
 
cCsBx!|jjƒD]}|jƒqW|jjƒ|jjƒdS(N(RËRÔRtclearR(R tconn((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt clear_cacheºs (R#R$R!RÐRÑR½RÒR×(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyRÊŒs                 
   (((((((PR-RöRNR·R­R4RR8R,R¨RÀRPR2R‚R!t    cStringIORt ImportErrorturllibRRRRRRRRR    R
R R R RRRRRtversionRmRRR©RRtIOErrorRR%R-R4R9R:RlRRÂR¶R²R³RñR¯RýRRR/R2R?R@RkRmRnR±RJR¸RŠR°RFRGR›RµR´RÊ(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/urllib2.pyt<module>Lst               ^"          r    'i    H+@
?     Œ m    
   +    4<