/opt/imh-python/lib/python3.9/wsgiref/__pycache__
NameSizeModeActions
handlers.cpython-39.opt-1.pyc159190644editdlrm
handlers.cpython-39.opt-2.pyc105100644editdlrm
handlers.cpython-39.pyc163850644editdlrm
headers.cpython-39.opt-1.pyc76900644editdlrm
headers.cpython-39.opt-2.pyc44610644editdlrm
headers.cpython-39.pyc77430644editdlrm
simple_server.cpython-39.opt-1.pyc53100644editdlrm
simple_server.cpython-39.opt-2.pyc45370644editdlrm
simple_server.cpython-39.pyc53100644editdlrm
util.cpython-39.opt-1.pyc54040644editdlrm
util.cpython-39.opt-2.pyc38330644editdlrm
util.cpython-39.pyc54040644editdlrm
validate.cpython-39.opt-1.pyc147660644editdlrm
validate.cpython-39.opt-2.pyc111330644editdlrm
validate.cpython-39.pyc147660644editdlrm
__init__.cpython-39.opt-1.pyc7350644editdlrm
__init__.cpython-39.opt-2.pyc1400644editdlrm
__init__.cpython-39.pyc7350644editdlrm
Edit: /opt/imh-python/lib/python3.9/wsgiref/__pycache__/util.cpython-39.pyc (5404B)
a cæhÛã@sbdZddlZgd¢ZGdd„dƒZdd„Zdd „Zdd d „Zd d„Zdd„Zhd£j Z dd„Z dS)z$Miscellaneous WSGI-related UtilitieséN)Ú FileWrapperÚ guess_schemeÚapplication_uriÚ request_uriÚshift_path_infoÚsetup_testing_defaultsc@s2eZdZdZd dd„Zdd„Zdd„Zd d „Zd S) rz1Wrapper to convert file-like objects to iterablesé cCs"||_||_t|dƒr|j|_dS)NÚclose)ÚfilelikeÚblksizeÚhasattrr )Úselfr r ©rú-/opt/imh-python/lib/python3.9/wsgiref/util.pyÚ__init__s zFileWrapper.__init__cCs6ddl}|jdtdd|j |j¡}|r.|St‚dS)NrzXFileWrapper's __getitem__ method ignores 'key' parameter. Use iterator protocol instead.é)Ú stacklevel)ÚwarningsÚwarnÚDeprecationWarningr Úreadr Ú IndexError)r ÚkeyrÚdatarrrÚ __getitem__süzFileWrapper.__getitem__cCs|S©Nr)r rrrÚ__iter__!szFileWrapper.__iter__cCs|j |j¡}|r|St‚dSr)r rr Ú StopIteration)r rrrrÚ__next__$szFileWrapper.__next__N)r)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrrrrrrr s   rcCs| d¡dvrdSdSdS)zMReturn a guess for whether 'wsgi.url_scheme' should be 'http' or 'https' ZHTTPS)ZyesZonÚ1ÚhttpsÚhttpN)Úget)Úenvironrrrr*srcCs |dd}ddlm}| d¡r0||d7}nR||d7}|ddkrf|dd kr‚|d |d7}n|dd kr‚|d |d7}||| d ¡p’d dd7}|S)z@Return the application's base URI (no PATH_INFO or QUERY_STRING)úwsgi.url_schemez://r©ÚquoteÚ HTTP_HOSTÚ SERVER_NAMEr$Ú SERVER_PORTÚ443ú:Ú80Ú SCRIPT_NAMEú/Úlatin1)Úencoding)Ú urllib.parser*r&)r'Úurlr*rrrr2s       rTcCspt|ƒ}ddlm}|| dd¡ddd}| d¡sF||d d …7}n||7}|rl| d ¡rl|d |d 7}|S) zBReturn the full request URI, optionally including the query stringrr)Ú PATH_INFOÚz/;=,r3)Úsafer4r1éNZ QUERY_STRINGú?)rr5r*r&)r'Z include_queryr6r*Ú path_inforrrrFs  rcCsº| dd¡}|sdS| d¡}dd„|dd…Dƒ|dd…<|d}|d=| d d¡}t |d|¡}| d¡r~|dd…}|s”| d¡s”|d7}||d <d |¡|d<|d kr¶d}|S) aZShift 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. r7r8Nr2cSsg|]}|r|dkr|‘qS)Ú.r)Ú.0ÚprrrÚ eóz#shift_path_info..r:éÿÿÿÿr1r=)r&ÚsplitÚ posixpathÚnormpathÚendswithÚjoin)r'r<Ú path_partsÚnameZ script_namerrrrSs$     rcCsþ| dd¡| dd¡| d|d¡| dd¡d|vr\d |vr\| dd ¡| d d ¡| d d ¡| dd¡| dd¡| dd¡ddlm}m}| d|ƒ¡| d|ƒ¡| dt|ƒ¡|ddkrâ| dd¡n|ddkrú| dd¡dS)a: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,z 127.0.0.1ZSERVER_PROTOCOLzHTTP/1.0r+ZREQUEST_METHODÚGETr1r7r8r2z wsgi.version)r:rz wsgi.run_oncerzwsgi.multithreadzwsgi.multiprocess)ÚStringIOÚBytesIOz wsgi.inputz wsgi.errorsr(r%r-r0r$r.N)Ú setdefaultÚiorKrLr)r'rKrLrrrr|s&           r>Útez keep-alivezproxy-authenticateZupgradeztransfer-encodingZtrailerszproxy-authorizationÚ connectioncCs t| ¡ƒS)z?Return true if 'header_name' is an HTTP/1.1 "Hop-by-Hop" header)Ú_hoppishÚlower)Z header_namerrrÚ is_hop_by_hopªsrS)T) r"rDÚ__all__rrrrrrÚ __contains__rQrSrrrrÚs )(