b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 / wsgiref /
Filename/usr/lib64/python2.6/wsgiref/util.pyc
Size5.89 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 11:42
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@s»dZddkZddddddgZddd ��YZd
�Zd �Zd d
�Zd�Zd�Zhd d6d d6d d6d d6d d6d d6d d6d d6i 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 cCs6||_||_t|d�o|i|_ndS(Ntclose(tfileliketblksizethasattrR(tselfRR((s$/usr/lib64/python2.6/wsgiref/util.pyt__init__s  cCs+|ii|i�}|o|St�dS(N(RtreadRt
IndexError(R
tkeytdata((s$/usr/lib64/python2.6/wsgiref/util.pyt __getitem__scCs|S(N((R
((s$/usr/lib64/python2.6/wsgiref/util.pyt__iter__scCs+|ii|i�}|o|St�dS(N(RR Rt
StopIteration(R
R((s$/usr/lib64/python2.6/wsgiref/util.pytnexts(t__name__t
__module__t__doc__R RRR(((s$/usr/lib64/python2.6/wsgiref/util.pyR s
   cCs#|id�djodSdSdS( sMReturn a guess for whether 'wsgi.url_scheme' should be 'http' or 'https'
tHTTPStyestont1thttpsthttpN(RRR(tget(tenviron((s$/usr/lib64/python2.6/wsgiref/util.pyR*scCsÕ|dd}ddkl}|id�o||d7}nr||d7}|ddjo+|dd jo|d
|d7}q±n(|dd jo|d
|d7}n|||id �pd
�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((s$/usr/lib64/python2.6/wsgiref/util.pyR2s icCs�t|�}ddkl}||idd��}|id�p||d7}n ||7}|o&|id�o|d|d7}n|S( sBReturn the full request URI, optionally including the query stringiÿÿÿÿ(Rt PATH_INFOtR&it QUERY_STRINGt?(RR(RR(Rt
include_queryR)Rt path_info((s$/usr/lib64/python2.6/wsgiref/util.pyRFs 
cCs+|idd�}|pdS|id�}g}|dd!D]%}|o|djo ||q?q?~|dd+|d}|d=|idd�}ti|d|�}|id�o|d }n| o|id� o|d7}n||d<di|�|d<|djo
d}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(RR/t
path_partst_[1]tptnamet script_name((s$/usr/lib64/python2.6/wsgiref/util.pyRSs$
G



cCs_|idd�|idd�|id|d�|idd�d|jo1d |jo$|idd
�|id d �n|id d�|idd�|idd�|idd�ddkl}|id|d
��|id|��|idt|��|ddjo|idd�n&|ddjo|idd�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?((s$/usr/lib64/python2.6/wsgiref/util.pyR|s&
t
connections
keep-alivesproxy-authenticatesproxy-authorizationttettrailersstransfer-encodingtupgradecCst|i��S(s?Return true if 'header_name' is an HTTP/1.1 "Hop-by-Hop" header(t_hoppishtlower(t header_name((s$/usr/lib64/python2.6/wsgiref/util.pyt
is_hop_by_hop«s(( RR3t__all__RRRRRRt __contains__RERH(((s$/usr/lib64/python2.6/wsgiref/util.pyt<module>s     
) )