HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.7/wsgiref/__pycache__/simple_server.cpython-37.pyc
B

{a	@s dZddlmZmZddlZddlZddlmZddl	m
Z
dZddd	d
gZdeZ
e
dejdZe
d
eZGdddeZGdddeZGdddeZdd	Zeefdd
ZedkreddeBZejZededdeddddlZedeWdQRXdS)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
WSGIServerWSGIRequestHandlerdemo_appmake_serverzWSGIServer// c@seZdZeZddZdS)
ServerHandlerc	Cs4z"|j|jddd|jWdt|XdS)Nrr)request_handlerZlog_requestZstatussplitZ
bytes_sentrclose)selfr+/usr/lib/python3.7/wsgiref/simple_server.pyr szServerHandler.closeN)__name__
__module____qualname__software_versionZserver_softwarerrrrrrsrc@s4eZdZdZdZddZddZddZd	d
ZdS)rz7BaseHTTPServer that implements the Python WSGI protocolNcCst||dS)z.Override server_bind to store the server name.N)rserver_bind
setup_environ)rrrrr0s
zWSGIServer.server_bindcCsFi}|_|j|d<d|d<t|j|d<d|d<d|d<d|d<dS)	NZSERVER_NAMEzCGI/1.1ZGATEWAY_INTERFACEZSERVER_PORTREMOTE_HOSTCONTENT_LENGTHZSCRIPT_NAME)base_environZserver_namestrZserver_port)renvrrrr5s

zWSGIServer.setup_environcCs|jS)N)application)rrrrget_app?szWSGIServer.get_appcCs
||_dS)N)r )rr rrrset_appBszWSGIServer.set_app)	rrr__doc__r rrr!r"rrrrr*s
c@s,eZdZdeZddZddZddZdS)	rzWSGIServer/cCsT|jj}|j|d<|j|d<|j|d<d|jkrH|jdd\}}n|jd}}tj	
|d|d<||d	<|}||jd
kr||d<|jd
|d<|j
d
dkr|j
|d<n|j
d
|d<|j
d}|r||d<xn|j
D]`\}}|dd}|}||krqd||kr@|d|d|7<q||d|<qW|S)NZSERVER_PROTOCOLZSERVER_SOFTWAREZREQUEST_METHOD?r
rz
iso-8859-1Z	PATH_INFOZQUERY_STRINGrrZREMOTE_ADDRzcontent-typeZCONTENT_TYPEzcontent-lengthr-_ZHTTP_,)serverrcopyrequest_versionserver_versioncommandpathrurllibparseZunquoteZaddress_stringZclient_addressZheadersgetZget_content_typeitemsreplaceupperstrip)rrr-Zqueryhostlengthkvrrrget_environKs8




zWSGIRequestHandler.get_environcCstjS)N)sysstderr)rrrr
get_stderrpszWSGIRequestHandler.get_stderrcCs||jd|_t|jdkr<d|_d|_d|_|ddS|sHdSt	|j|j
||}||_
||jdS)zHandle a single HTTP requestiiriN)ZrfilereadlineZraw_requestlinelenZrequestliner*r,Z
send_errorZ
parse_requestrZwfiler<r9rrunr(r!)rZhandlerrrrhandless
zWSGIRequestHandler.handleN)rrr__version__r+r9r<r@rrrrrGs%cCsvddlm}|}td|dt|dt|}x$|D]\}}t|dt||dq:W|ddg|dgS)	Nr)StringIOzHello world!)file=z200 OK)zContent-Typeztext/plain; charset=utf-8zutf-8)iorBprintsortedr1reprgetvalueencode)environZstart_responserBstdouthr7r8rrrrs
cCs|||f|}|||S)zACreate a new WSGI server listening on `host` and `port` for `app`)r")r5portZappZserver_classZ
handler_classr(rrrr	s
__main__ri@zServing HTTP onrNr
z...zhttp://localhost:8000/xyz?abc) r#Zhttp.serverrrr:Zurllib.parser.Zwsgiref.handlersrplatformrrA__all__r+versionrsys_versionrrrrrr	rZhttpdZsocketZgetsocknameZsarFZ
webbrowseropenZhandle_requestrrrr<module>s,B