Current Path : /usr/local/lib/python2.5/ |
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 |
Current File : //usr/local/lib/python2.5/SimpleHTTPServer.pyo |
³ò h”Rc @ sö d Z d Z d g Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z y d d k l Z Wn# e j o d d k l Z n Xd e i f d „ ƒ YZ e e i d „ Z e d j o e ƒ n d S( s’ Simple HTTP Server. This module builds on BaseHTTPServer by implementing the standard GET and HEAD requests in a fairly straightforward manner. s 0.6t SimpleHTTPRequestHandleriÿÿÿÿN( t StringIOc B s¯ e Z d Z d e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z e i p e i ƒ n e i i ƒ Z e i h d d <d d <d d <d d <ƒ RS( sW Simple HTTP request handler with GET and HEAD commands. This serves files from the current directory and any of its subdirectories. The MIME type for files is determined by calling the .guess_type() method. The GET and HEAD requests are identical except that the HEAD request omits the actual contents of the file. s SimpleHTTP/c C s8 | i ƒ } | o! | i | | i ƒ | i ƒ n d S( s Serve a GET request.N( t send_headt copyfilet wfilet close( t selft f( ( s, /usr/local/lib/python2.5/SimpleHTTPServer.pyt do_GET* s c C s% | i ƒ } | o | i ƒ n d S( s Serve a HEAD request.N( R R ( R R ( ( s, /usr/local/lib/python2.5/SimpleHTTPServer.pyt do_HEAD1 s c C s« | i | i ƒ } d } t i i | ƒ ož | i i d ƒ p6 | i d ƒ | i d | i d ƒ | i ƒ d Sn xR d D]9 } t i i | | ƒ } t i i | ƒ o | } Pq{ q{ W| i | ƒ Sn | i | ƒ } | i d ƒ o d } n d } y t | | ƒ } Wn' t j o | i d d ƒ d Sn X| i d ƒ | i d | ƒ t i | i ƒ ƒ } | i d t | d ƒ ƒ | i d | i | i ƒ ƒ | i ƒ | S( s{ Common code for GET and HEAD commands. This sends the response code and MIME headers. Return value is either a file object (which has to be copied to the outputfile by the caller unless the command was HEAD, and must be closed by the caller under all circumstances), or None, in which case the caller has nothing further to do. t /i- t Locations index.htmls index.htms text/t rt rbi” s File not foundiÈ s Content-types Content-Lengthi s Last-ModifiedN( s index.htmls index.htm( t translate_patht patht Nonet ost isdirt endswitht send_responset send_headert end_headerst joint existst list_directoryt guess_typet startswitht opent IOErrort send_errort fstatt filenot strt date_time_stringt st_mtime( R R R t indext ctypet modet fs( ( s, /usr/local/lib/python2.5/SimpleHTTPServer.pyR 7 s>