# HG changeset patch # User RĂ©mi Cardona # Date 1442322484 -7200 # Node ID 9924fd69bcbaad2b41b4f714b40383329907291c # Parent f6f425a54a8d7a606a34f90c19254aa8aaf44057 [py3k] io.BytesIO diff -r f6f425a54a8d -r 9924fd69bcba 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)