From b41f94a1296a64a2313560c8d5b73c938b5f17da Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 7 Dec 1998 03:53:18 +0000 Subject: Open the file in binary mode -- so serving images from a Windows box might actually work. --- Lib/SimpleHTTPServer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/SimpleHTTPServer.py') 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 -- cgit v1.2.1