summaryrefslogtreecommitdiff
path: root/Lib/SimpleHTTPServer.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-12-31 19:15:26 +0000
committerRaymond Hettinger <python@rcn.com>2004-12-31 19:15:26 +0000
commit29f9f307681081e4d1eedc507157bd3bc22c709a (patch)
treef2958e1eb083f58f93ee60048673495333783c5a /Lib/SimpleHTTPServer.py
parent50a653c43c606f26d53282e8a1233ed0fb047b65 (diff)
downloadcpython-29f9f307681081e4d1eedc507157bd3bc22c709a.tar.gz
Use cStringIO where available.
Diffstat (limited to 'Lib/SimpleHTTPServer.py')
-rw-r--r--Lib/SimpleHTTPServer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/SimpleHTTPServer.py b/Lib/SimpleHTTPServer.py
index 93662ab194..93af10900a 100644
--- a/Lib/SimpleHTTPServer.py
+++ b/Lib/SimpleHTTPServer.py
@@ -17,7 +17,10 @@ import urllib
import cgi
import shutil
import mimetypes
-from StringIO import StringIO
+try:
+ from cStringIO import StringIO
+except ImportError:
+ from StringIO import StringIO
class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):