/usr/lib64/python3.9/wsgiref/__pycache__
NameSizeModeActions
handlers.cpython-39.opt-1.pyc159100644editdlrm
handlers.cpython-39.opt-2.pyc105010644editdlrm
handlers.cpython-39.pyc163760644editdlrm
headers.cpython-39.opt-1.pyc78160644editdlrm
headers.cpython-39.opt-2.pyc45870644editdlrm
headers.cpython-39.pyc78690644editdlrm
simple_server.cpython-39.opt-1.pyc53010644editdlrm
simple_server.cpython-39.opt-2.pyc45280644editdlrm
simple_server.cpython-39.pyc53010644editdlrm
util.cpython-39.opt-1.pyc53950644editdlrm
util.cpython-39.opt-2.pyc38240644editdlrm
util.cpython-39.pyc53950644editdlrm
validate.cpython-39.opt-1.pyc147570644editdlrm
validate.cpython-39.opt-2.pyc111240644editdlrm
validate.cpython-39.pyc147570644editdlrm
__init__.cpython-39.opt-1.pyc7260644editdlrm
__init__.cpython-39.opt-2.pyc1310644editdlrm
__init__.cpython-39.pyc7260644editdlrm
Edit: /usr/lib64/python3.9/wsgiref/__pycache__/simple_server.cpython-39.pyc (5301B)
a ´i3ã@s2dZddlmZmZddlZddlZddlmZddl m Z dZ gd¢Z de Z e ƒd ej ¡dZe d eZGd d „d eƒZGd d„deƒZGdd„deƒZdd„Zeefdd„Zedk�r.eddeƒ�LZej ¡ZededdeddƒddlZe d¡e ¡Wdƒn1�s$0YdS)a!BaseHTTPServer that implements the Python WSGI protocol (PEP 3333) This is both an example of how WSGI can be implemented, and a basis for running simple web applications on a local machine, such as might be done when testing or debugging an application. It has not been reviewed for security issues, however, and we strongly recommend that you use a "real" web server for production use. For example usage, see the 'if __name__=="__main__"' block at the end of the module. See also the BaseHTTPServer module docs for other API information. é)ÚBaseHTTPRequestHandlerÚ HTTPServerN)Ú SimpleHandler)Úpython_implementationz0.2)Ú WSGIServerÚWSGIRequestHandlerÚdemo_appÚ make_serverú WSGIServer/ú/ú c@seZdZeZdd„ZdS)Ú ServerHandlerc Cs>z,|j |j dd¡d|j¡Wt |¡n t |¡0dS)Nr ér)Úrequest_handlerZ log_requestÚstatusÚsplitZ bytes_sentrÚclose©Úself©rú-/usr/lib64/python3.9/wsgiref/simple_server.pyr s ÿzServerHandler.closeN)Ú__name__Ú __module__Ú __qualname__Úsoftware_versionZserver_softwarerrrrrr sr c@s4eZdZdZdZdd„Zdd„Zdd„Zd d „ZdS) rz7BaseHTTPServer that implements the Python WSGI protocolNcCst |¡| ¡dS)z.Override server_bind to store the server name.N)rÚ server_bindÚ setup_environrrrrr0s zWSGIServer.server_bindcCsFi}|_|j|d<d|d<t|jƒ|d<d|d<d|d<d|d<dS) NZ SERVER_NAMEzCGI/1.1ZGATEWAY_INTERFACEZ SERVER_PORTÚÚ REMOTE_HOSTÚCONTENT_LENGTHZ SCRIPT_NAME)Ú base_environZ server_nameÚstrZ server_port)rÚenvrrrr5s  zWSGIServer.setup_environcCs|jS©N©Ú applicationrrrrÚget_app?szWSGIServer.get_appcCs ||_dSr#r$)rr%rrrÚset_appBszWSGIServer.set_app) rrrÚ__doc__r%rrr&r'rrrrr*s  rc@s,eZdZdeZdd„Zdd„Zdd„ZdS) rr cCsP|jj ¡}|j|d<|j|d<|j|d<d|jvrH|j dd¡\}}n |jd}}tj   |d¡|d<||d <|  ¡}||j d krŒ||d <|j d |d <|j  d ¡durº|j  ¡|d<n|j d |d<|j  d¡}|rà||d<|j  ¡D]`\}}| dd¡ ¡}| ¡}||v�rqêd||v�r>|d|d|7<qê||d|<qê|S)NZSERVER_PROTOCOLZSERVER_SOFTWAREZREQUEST_METHODú?rrz iso-8859-1Z PATH_INFOZ QUERY_STRINGrrZ REMOTE_ADDRz content-typeZ CONTENT_TYPEzcontent-lengthrú-Ú_ZHTTP_ú,)Úserverr ÚcopyÚrequest_versionÚserver_versionÚcommandÚpathrÚurllibÚparseÚunquoteZaddress_stringZclient_addressZheadersÚgetZget_content_typeÚitemsÚreplaceÚupperÚstrip)rr"r2ÚqueryÚhostÚlengthÚkÚvrrrÚ get_environKs6        zWSGIRequestHandler.get_environcCstjSr#)ÚsysÚstderrrrrrÚ get_stderrpszWSGIRequestHandler.get_stderrcCs€|j d¡|_t|jƒdkrr?rrrrŠs      rcCs|||f|ƒ}| |¡|S)zACreate a new WSGI server listening on `host` and `port` for `app`)r')r<ÚportZappZ server_classZ handler_classr-rrrr –s r Ú__main__ri@zServing HTTP onrVrz...zhttp://localhost:8000/xyz?abc) r(Z http.serverrrrAÚ urllib.parser3Zwsgiref.handlersrÚplatformrrIÚ__all__r0ÚversionrÚ sys_versionrr rrrr rZhttpdÚsocketÚ getsocknameÚsarNZ webbrowserÚopenZhandle_requestrrrrÚs.    C ÿ