ó o”þfc@sYdZddlmZmZddlZddlZddlmZdZdddd gZ d eZ d ej j ƒd Z e d e Zdefd„ƒYZdefd„ƒYZdefd„ƒYZd„Zeed„ZedkrUeddeƒZejjƒZdGed GdGedGdGHddlZejdƒejƒndS(s*BaseHTTPServer that implements the Python WSGI protocol (PEP 333, rev 1.21) 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. iÿÿÿÿ(tBaseHTTPRequestHandlert HTTPServerN(t SimpleHandlers0.1t WSGIServertWSGIRequestHandlertdemo_appt make_servers WSGIServer/sPython/it t ServerHandlercBseZeZd„ZRS(cCsBz-|jj|jjddƒd|jƒWdtj|ƒXdS(NRii(trequest_handlert log_requesttstatustsplitt bytes_sentRtclose(tself((s-/usr/lib64/python2.7/wsgiref/simple_server.pyRs $(t__name__t __module__tsoftware_versiontserver_softwareR(((s-/usr/lib64/python2.7/wsgiref/simple_server.pyRscBs8eZdZdZd„Zd„Zd„Zd„ZRS(s7BaseHTTPServer that implements the Python WSGI protocolcCstj|ƒ|jƒdS(s.Override server_bind to store the server name.N(Rt server_bindt setup_environ(R((s-/usr/lib64/python2.7/wsgiref/simple_server.pyR.s cCsYi}|_|j|d s( ;