diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py index 71268558f70..717a472b59a 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