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("\nDirectory listing for %s
\n" % displaypath)
f.write("
\n\n")
for name in list:
fullname = os.path.join(path, name)
@@ -127,7 +128,7 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
# Note: a link to a directory displays with @ and links with /
f.write('- %s\n'
% (urllib.quote(linkname), cgi.escape(displayname)))
- f.write("
\n
\n")
+ f.write("\n
\n\n\n")
length = f.tell()
f.seek(0)
self.send_response(200)