diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py index 7b6e8679af7..e79a478d97e 100644 --- a/Lib/SimpleHTTPServer.py +++ b/Lib/SimpleHTTPServer.py @@ -112,8 +112,9 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): list.sort(key=lambda a: a.lower()) f = StringIO() displaypath = cgi.escape(urllib.unquote(self.path)) - f.write("Directory listing for %s\n" % displaypath) - f.write("

Directory listing for %s

\n" % displaypath) + f.write('') + f.write("\nDirectory listing for %s\n" % displaypath) + f.write("\n

Directory listing for %s

\n" % displaypath) f.write("
\n\n
\n") + f.write("\n
\n\n\n") length = f.tell() f.seek(0) self.send_response(200)