Commit b41f94a1 authored by Guido van Rossum's avatar Guido van Rossum

Open the file in binary mode -- so serving images from a Windows box

might actually work.
parent 5098d4a9
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment