|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/21573/task/21573/root/proc/21572/root/usr/lib64/python2.4/ |
Upload File : |
mς
=5Dc @ sΊ d Z d Z d g Z d k Z d k Z d k Z d k Z d k Z d k Z d k Z d k
Z
d k Z d k l Z d 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 SimpleHTTPRequestHandlerN( s StringIOc B s t Z d Z d e Z d Z d Z d Z d Z d Z d Z
d Z 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 selft send_headt ft copyfilet wfilet close( R R ( ( t( /usr/lib64/python2.4/SimpleHTTPServer.pyt do_GET( s
c C s% | i } | o | i n d S( s Serve a HEAD request.N( R R R R ( R R ( ( R t do_HEAD/ s c C s | i | i } d
} t i i | oU xR d D]9 } t i i | | } t i i | o | } Pq2 q2 W| i
| Sn | i | } y t
| d } Wn' t j
o | i d d d
Sn X| i d | i d | | i d t t i | i d | 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.
s
index.htmls index.htmt rbi s File not foundiΘ s Content-types Content-Lengthi N( s
index.htmls index.htm( R t translate_patht patht NoneR t ost isdirt indext joint existst list_directoryt
guess_typet ctypet opent IOErrort
send_errort
send_responset send_headert strt fstatt filenot end_headers( R R R R R ( ( R R 5 s,
)
c C sΒ y t i | } Wn* t i j
o | i d d d Sn X| i d d t } t i t
i | i } | i d | | i d | | i d x’ | D] } t i i | | }
| } } t i i |
o | d } | d } n t i i |
o | d } n | i d
t
i | t i | f q W| i d | i } | i d | i d
t i } | i d d | | i d t! | | i"