Commit Graph

11 Commits

Author SHA1 Message Date
Moshe Zadka 37c03ff3a9 Using shutil's function to copy data between file objects instead
of rolling our own.

Note:
This is my first sourceforge checkin. If you see anything funny about
this patch, please let me know.
2000-07-29 05:15:56 +00:00
Guido van Rossum 1d10f3eac2 Changed list_directory() somewhat. It is now only called when there
is no index.htm[l] file, and when it is called, it also spits out the
headers.  When an index.htm[l] file is present, the regular (file
access) path is followed.  Also, when the guessed content-type matches
text/*, open the file in text mode; otherwise in binary mode.
2000-05-21 16:25:29 +00:00
Guido van Rossum 57af072e5c Add a simple directory listing function. 2000-05-09 14:57:09 +00:00
Guido van Rossum d7b147b040 Moshe Zadka writes: When deploying SimpleHTTPServer, I noticed a
problem: it does not encode/decode the urls, which is wrong.
1999-11-16 19:04:32 +00:00
Guido van Rossum f8fd11d039 No need to import sys, time, socket or SocketServer. (Andrew Dalke & kjpylint) 1999-05-03 18:01:31 +00:00
Guido van Rossum 5c3b384a85 Patch by Jeff Rush:
In SimpleHTTPServer.py, the server specified in test() should
be BaseHTTPServer.HTTPServer, in case the request handler should
want to reference the two attributes added by
BaseHTTPServer.server_bind:

        self.server_name = hostname
        self.server_port = port

There was some Bobo CGI code that wanted access to those attributes.
1998-12-07 04:08:30 +00:00
Guido van Rossum 391c8b4ea2 Open the file in binary mode -- so serving images from a Windows box
might actually work.
1998-12-07 03:53:18 +00:00
Guido van Rossum 45e2fbc2e7 Mass check-in after untabifying all files that need it. 1998-03-26 21:13:24 +00:00
Guido van Rossum f469d5b05d Get rid of nobody_uid() and import pwd -- not used here. 1996-09-04 23:42:04 +00:00
Guido van Rossum 3b7b8131a6 recognize a few more file types 1995-09-18 21:50:43 +00:00
Guido van Rossum e7e578ffe0 Initial revision 1995-08-04 04:00:20 +00:00