wsgi/request.py
changeset 10673 9924fd69bcba
parent 10662 10942ed172de
child 10739 27f946cfe350
--- a/wsgi/request.py	Wed Sep 16 17:28:06 2015 +0200
+++ b/wsgi/request.py	Tue Sep 15 15:08:04 2015 +0200
@@ -27,7 +27,7 @@
 
 import tempfile
 
-from StringIO import StringIO
+from io import BytesIO
 
 from six.moves.urllib.parse import parse_qs
 
@@ -58,7 +58,7 @@
             length = 0
         # wsgi.input is not seekable, so copy the request contents to a temporary file
         if length < 100000:
-            self.content = StringIO()
+            self.content = BytesIO()
         else:
             self.content = tempfile.TemporaryFile()
         copy_file(environ['wsgi.input'], self.content, maxread=length)