config root man

Current Path : /usr/local/lib/python2.5/wsgiref/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/python2.5/wsgiref/simple_server.pyc

³ò
h”Rc@s[dZddklZlZddkZddkZddklZdZdddd	gZ	d
eZ
deiiƒdZ
e
d
e
Zdefd„ƒYZdefd„ƒYZdefd„ƒYZd„Zeed„ZedjoeeddeƒZeiiƒZdGedGdGedGdGHddkZeidƒeiƒ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_apptmake_serversWSGIServer/sPython/it t
ServerHandlercBseZeZd„ZRS(cCsBz-|ii|iiddƒd|iƒWdti|ƒXdS(NRii(trequest_handlertlog_requesttstatustsplitt
bytes_sentRtclose(tself((s1/usr/local/lib/python2.5/wsgiref/simple_server.pyRs	$(t__name__t
__module__tsoftware_versiontserver_softwareR(((s1/usr/local/lib/python2.5/wsgiref/simple_server.pyRscBs8eZdZdZd„Zd„Zd„Zd„ZRS(s7BaseHTTPServer that implements the Python WSGI protocolcCsti|ƒ|iƒdS(s.Override server_bind to store the server name.N(Rtserver_bindt
setup_environ(R((s1/usr/local/lib/python2.5/wsgiref/simple_server.pyR0s
cCsYh}|_|i|d<d|d<t|iƒ|d<d|d<d|d<d|d<dS(	NtSERVER_NAMEsCGI/1.1tGATEWAY_INTERFACEtSERVER_PORTttREMOTE_HOSTtCONTENT_LENGTHtSCRIPT_NAME(tbase_environtserver_nametstrtserver_port(Rtenv((s1/usr/local/lib/python2.5/wsgiref/simple_server.pyR5s




cCs|iS(N(tapplication(R((s1/usr/local/lib/python2.5/wsgiref/simple_server.pytget_app?scCs
||_dS(N(R"(RR"((s1/usr/local/lib/python2.5/wsgiref/simple_server.pytset_appBsN(	RRt__doc__tNoneR"RRR#R$(((s1/usr/local/lib/python2.5/wsgiref/simple_server.pyR*s		
	cBs-eZdeZd„Zd„Zd„ZRS(sWSGIServer/c	CsË|iiiƒ}|i|d<|i|d<d|ijo|iiddƒ\}}n|id}}ti|ƒ|d<||d<|i	ƒ}||i
djo||d	<n|i
d|d
<|iidjo|ii|d<n|ii|d<|iidƒ}|o||d
<nxŸ|iiD]‘}|iddƒ\}}|iddƒiƒ}|iƒ}||joq2nd||jo|d|cd|7<q2||d|<q2W|S(NtSERVER_PROTOCOLtREQUEST_METHODt?iRt	PATH_INFOtQUERY_STRINGiRtREMOTE_ADDRtCONTENT_TYPEscontent-lengthRt:t-t_tHTTP_t,(tserverRtcopytrequest_versiontcommandtpathRturllibtunquotetaddress_stringtclient_addresstheaderst
typeheaderR&ttypet	getheadertreplacetuppertstrip(	RR!R7tquerythosttlengththtktv((s1/usr/local/lib/python2.5/wsgiref/simple_server.pytget_environWs:




cCstiS(N(tsyststderr(R((s1/usr/local/lib/python2.5/wsgiref/simple_server.pyt
get_stderr|scCsq|iiƒ|_|iƒpdSnt|i|i|iƒ|iƒƒ}||_|i	|i
iƒƒdS(sHandle a single HTTP requestN(trfiletreadlinetraw_requestlinet
parse_requestRtwfileRLRIR	trunR3R#(Rthandler((s1/usr/local/lib/python2.5/wsgiref/simple_server.pythandles
$	(RRt__version__tserver_versionRIRLRT(((s1/usr/local/lib/python2.5/wsgiref/simple_server.pyRSs
	%	cCsˆddkl}|ƒ}|dIJ|J|iƒ}|iƒx+|D]#\}}||IdI|
IJqDW|ddgƒ|iƒgS(	Niÿÿÿÿ(tStringIOsHello world!t=s200 OKsContent-Types
text/plain(sContent-Types
text/plain(RWtitemstsorttgetvalue(tenvirontstart_responseRWtstdoutRFRGRH((s1/usr/local/lib/python2.5/wsgiref/simple_server.pyR¥s	

cCs&|||f|ƒ}|i|ƒ|S(sACreate a new WSGI server listening on `host` and `port` for `app`(R$(RDtporttapptserver_classt
handler_classR3((s1/usr/local/lib/python2.5/wsgiref/simple_server.pyR±s
t__main__Ri@sServing HTTP onR_is...shttp://localhost:8000/xyz?abc(R%tBaseHTTPServerRRR8RJtwsgiref.handlersRRUt__all__RVtversionRtsys_versionRRRRRRRthttpdtsockettgetsocknametsat
webbrowsertopenthandle_request(((s1/usr/local/lib/python2.5/wsgiref/simple_server.pys<module>s(
)R	




Man Man