diff options
author | Guido van Rossum <guido@python.org> | 1998-12-07 03:53:18 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-12-07 03:53:18 +0000 |
commit | b41f94a1296a64a2313560c8d5b73c938b5f17da (patch) | |
tree | 0275bc4b70676844961ddb318bd9f3ba4e5b8617 /Lib/SimpleHTTPServer.py | |
parent | 5098d4a909201a1d2f06b74bd833fac86d9d1522 (diff) | |
download | cpython-b41f94a1296a64a2313560c8d5b73c938b5f17da.tar.gz |
Open the file in binary mode -- so serving images from a Windows box
might actually work.
Diffstat (limited to 'Lib/SimpleHTTPServer.py')
-rw-r--r-- | Lib/SimpleHTTPServer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py index 71268558f7..717a472b59 100644 --- a/Lib/SimpleHTTPServer.py +++ b/Lib/SimpleHTTPServer.py @@ -64,7 +64,7 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): 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 |