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
X\¬Qc@s»dZddlZddddddgZddd    „ƒYZd
„Zd „Zd d „Zd„Zd„Zid d6d d6d d6d d6d d6d d6d d6d d6j    Z
d„Z dS(s$Miscellaneous WSGI-related UtilitiesiÿÿÿÿNt FileWrappert guess_schemetapplication_urit request_uritshift_path_infotsetup_testing_defaultscBs5eZdZdd„Zd„Zd„Zd„ZRS(s1Wrapper to convert file-like objects to iterablesi cCs4||_||_t|dƒr0|j|_ndS(Ntclose(tfileliketblksizethasattrR(tselfRR((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/wsgiref/util.pyt__init__s        cCs)|jj|jƒ}|r|St‚dS(N(RtreadRt
IndexError(R
tkeytdata((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/wsgiref/util.pyt __getitem__scCs|S(N((R
((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/wsgiref/util.pyt__iter__scCs)|jj|jƒ}|r|St‚dS(N(RR Rt StopIteration(R
R((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/wsgiref/util.pytnexts(t__name__t
__module__t__doc__R RRR(((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/wsgiref/util.pyR s
         cCs!|jdƒdkrdSdSdS(    sMReturn a guess for whether 'wsgi.url_scheme' should be 'http' or 'https'
    tHTTPStyestont1thttpsthttpN(RRR(tget(tenviron((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/wsgiref/util.pyR#scCsÌ|dd}ddlm}|jdƒr>||d7}nk||d7}|ddkr„|dd    kr©|d
|d7}q©n%|dd kr©|d
|d7}n|||jd ƒpÁd ƒ7}|S(s@Return the application's base URI (no PATH_INFO or QUERY_STRING)swsgi.url_schemes://iÿÿÿÿ(tquotet    HTTP_HOSTt SERVER_NAMERt SERVER_PORTt443t:t80t SCRIPT_NAMEt/(turllibRR(RturlR((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/wsgiref/util.pyR+sicCs’t|ƒ}ddlm}||jddƒddƒ}|jdƒsZ||d7}n
||7}|rŽ|jd    ƒrŽ|d
|d    7}n|S( sBReturn the full request URI, optionally including the query stringiÿÿÿÿ(Rt    PATH_INFOttsafes/;=,R&it QUERY_STRINGt?(RR(RR(Rt include_queryR)Rt    path_info((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/wsgiref/util.pyR?s 
cCs|jddƒ}|sdS|jdƒ}g|dd!D]}|r9|dkr9|^q9|dd+|d}|d=|jddƒ}tj|d|ƒ}|jdƒrº|d }n| rÞ|jdƒ rÞ|d7}n||d<dj|ƒ|d<|dkrd}n|S(    sZShift a name from PATH_INFO to SCRIPT_NAME, returning it
 
    If there are no remaining path segments in PATH_INFO, return None.
    Note: 'environ' is modified in-place; use a copy if you need to keep
    the original PATH_INFO or SCRIPT_NAME.
 
    Note: when PATH_INFO is just a '/', this returns '' and appends a trailing
    '/' to SCRIPT_NAME, even though empty path segments are normally ignored,
    and SCRIPT_NAME doesn't normally end in a '/'.  This is intentional
    behavior, to ensure that an application can tell the difference between
    '/x' and '/x/' when traversing to objects.
    R*R+R'iiÿÿÿÿt.R&N(RtNonetsplitt    posixpathtnormpathtendswithtjoin(RR0t
path_partstptnamet script_name((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/wsgiref/util.pyRLs$ 9
 
     cCsX|jddƒ|jddƒ|jd|dƒ|jddƒd|krd    |kr|jdd
ƒ|jd    d ƒn|jd dƒ|jddƒ|jddƒ|jddƒddlm}|jd|d
ƒƒ|jd|ƒƒ|jdt|ƒƒ|ddkr1|jddƒn#|ddkrT|jddƒndS(s:Update 'environ' with trivial defaults for testing purposes
 
    This adds various parameters required for WSGI, including HTTP_HOST,
    SERVER_NAME, SERVER_PORT, REQUEST_METHOD, SCRIPT_NAME, PATH_INFO,
    and all of the wsgi.* variables.  It only supplies default values,
    and does not replace any existing settings for these variables.
 
    This routine is intended to make it easier for unit tests of WSGI
    servers and applications to set up dummy environments.  It should *not*
    be used by actual WSGI servers or applications, since the data is fake!
    R!s    127.0.0.1tSERVER_PROTOCOLsHTTP/1.0R tREQUEST_METHODtGETR&R*R+R's wsgi.versioniis wsgi.run_onceswsgi.multithreadswsgi.multiprocessiÿÿÿÿ(tStringIOs
wsgi.inputs wsgi.errorsswsgi.url_schemeRR"R%RR#N(ii(t
setdefaultR?R(RR?((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/wsgiref/util.pyRus& t
connections
keep-alivesproxy-authenticatesproxy-authorizationttettrailersstransfer-encodingtupgradecCst|jƒƒS(s?Return true if 'header_name' is an HTTP/1.1 "Hop-by-Hop" header(t_hoppishtlower(t header_name((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/wsgiref/util.pyt is_hop_by_hop£s(( RR4t__all__RRRRRRt __contains__RERH(((sT/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/wsgiref/util.pyt<module>s               )    (