[py3k] io.BytesIO
authorRémi Cardona <remi.cardona@logilab.fr>
Tue, 15 Sep 2015 15:08:04 +0200
changeset 10673 9924fd69bcba
parent 10672 f6f425a54a8d
child 10674 f0006bdd36e9
[py3k] io.BytesIO
wsgi/request.py
--- 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)