7ec@scdZddlmZmZddlZddlZddlmZdZdddd gZ d eZ d ej j d Z e d e ZdefdYZdefdYZdefdYZdZeedZedkr_eddeZejjZdGed GdGedGdGHddlZejdejejndS(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 ServerHandlercBseZeZdZRS(cCsBz-|jj|jjddd|jWdtj|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.pyRscBs8eZdZdZdZdZdZdZRS(s7BaseHTTPServer that implements the Python WSGI protocolcCstj||jdS(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* B