Commits

Senthil Kumaran committed 6cd7de9 Merge

merge from 2.6 branch

  • Participants
  • Parent commits 421c941, 8cdb95c
  • Branches 2.7

Comments (0)

Files changed (1)

File Lib/SimpleHTTPServer.py

 import BaseHTTPServer
 import urllib
 import cgi
+import sys
 import shutil
 import mimetypes
 try:
         length = f.tell()
         f.seek(0)
         self.send_response(200)
-        self.send_header("Content-type", "text/html")
+        encoding = sys.getfilesystemencoding()
+        self.send_header("Content-type", "text/html; charset=%s" % encoding)
         self.send_header("Content-Length", str(length))
         self.end_headers()
         return f