[Python-checkins] cpython (merge 2.6 -> 2.7): merge from 2.6 branch

senthil.kumaran python-checkins at python.org
Thu Mar 17 07:49:55 CET 2011


http://hg.python.org/cpython/rev/6cd7de9deb1a
changeset: 68642:6cd7de9deb1a
branch: 2.7
parent: 68638:421c941c529f
parent: 68641:8cdb95cf096e
user: Senthil Kumaran <orsenthil at gmail.com>
date: Thu Mar 17 14:24:35 2011 +0800
summary:
 merge from 2.6 branch
files:
 
diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py
--- a/Lib/SimpleHTTPServer.py
+++ b/Lib/SimpleHTTPServer.py
@@ -15,6 +15,7 @@
 import BaseHTTPServer
 import urllib
 import cgi
+import sys
 import shutil
 import mimetypes
 try:
@@ -131,7 +132,8 @@
 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
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /