summaryrefslogtreecommitdiff
path: root/wsgitools/scgi
diff options
context:
space:
mode:
Diffstat (limited to 'wsgitools/scgi')
-rw-r--r--wsgitools/scgi/asynchronous.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/wsgitools/scgi/asynchronous.py b/wsgitools/scgi/asynchronous.py
index 1dee283..7eb1a30 100644
--- a/wsgitools/scgi/asynchronous.py
+++ b/wsgitools/scgi/asynchronous.py
@@ -1,14 +1,9 @@
__all__ = []
import asyncore
+import io
import socket
import sys
-# Cannot use io module as it is broken in 2.6.
-# Writing a str to a io.StringIO results in an exception.
-try:
- import cStringIO as io
-except ImportError:
- import StringIO as io
import errno
from wsgitools.scgi import _convert_environ, FileWrapper
@@ -48,7 +43,7 @@ class SCGIConnection(asyncore.dispatcher):
self.wsgiiterator = None # wsgi application iterator
self.outheaders = () # headers to be sent
# () -> unset, (..,..) -> set, True -> sent
- self.body = io.StringIO() # request body
+ self.body = io.BytesIO() # request body
def _try_send_headers(self):
if self.outheaders != True: