ACC SHELL
Ñò
sÄMc @ s[ d Z d d k l Z l Z d d k Z d d k Z d d k l Z d Z d d d d g Z d
e Z
d e i i ƒ d Z
e
d
e
Z d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d „ Z e e d „ Z e d j oe e d d e ƒ Z e i i ƒ Z d Ge d Gd Ge d Gd GHd d k Z e i d ƒ e i ƒ n d S( 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ÿÿÿÿ( t BaseHTTPRequestHandlert
HTTPServerN( t
SimpleHandlers 0.1t
WSGIServert WSGIRequestHandlert demo_appt make_servers WSGIServer/s Python/i t t
ServerHandlerc B s e Z e Z d „ Z RS( c C sB z- | i i | i i d d ƒ d | i ƒ Wd t i | ƒ Xd S( NR i i ( t request_handlert log_requestt statust splitt
bytes_sentR t close( t self( ( s+ /usr/lib/python2.6/wsgiref/simple_server.pyR s $( t __name__t
__module__t software_versiont server_softwareR ( ( ( s+ /usr/lib/python2.6/wsgiref/simple_server.pyR s c B s8 e Z d Z d Z d „ Z d „ Z d „ Z d „ Z RS( s7 BaseHTTPServer that implements the Python WSGI protocolc C s t i | ƒ | i ƒ d S( s. Override server_bind to store the server name.N( R t server_bindt
setup_environ( R ( ( s+ /usr/lib/python2.6/wsgiref/simple_server.pyR 0 s
c C sY h } | _ | i | d <d | d <t | i ƒ | d <d | d <d | d <d | d <d S( Nt SERVER_NAMEs CGI/1.1t GATEWAY_INTERFACEt SERVER_PORTt t REMOTE_HOSTt CONTENT_LENGTHt SCRIPT_NAME( t base_environt server_namet strt server_port( R t env( ( s+ /usr/lib/python2.6/wsgiref/simple_server.pyR 5 s
c C s | i S( N( t application( R ( ( s+ /usr/lib/python2.6/wsgiref/simple_server.pyt get_app? s c C s
| | _ d S( N( R"