Mercurial > cpython-lru_cache-weakref
diff Lib/SimpleHTTPServer.py @ 9598:54aafe42c0c3 legacy-trunk
Open the file in binary mode -- so serving images from a Windows box
might actually work.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 07 Dec 1998 03:53:18 +0000 |
| parents | fb4b4d069cc7 |
| children | fcbf222e6898 |
line wrap: on
line diff
--- a/Lib/SimpleHTTPServer.py Sat Dec 05 22:19:06 1998 +0000 +++ b/Lib/SimpleHTTPServer.py Mon Dec 07 03:53:18 1998 +0000 @@ -64,7 +64,7 @@ self.send_error(403, "Directory listing not supported") return None try: - f = open(path) + f = open(path, 'rb') except IOError: self.send_error(404, "File not found") return None
