Use BytesIO instead of StringIO.

This commit is contained in:
Jeremy Hylton 2007-08-04 03:34:03 +00:00
parent 0ee5eeb8ff
commit 4e7855d7fd
1 changed files with 1 additions and 3 deletions

View File

@ -72,8 +72,6 @@ import mimetools
import socket
from urlparse import urlsplit
from io import StringIO
__all__ = ["HTTP", "HTTPResponse", "HTTPConnection", "HTTPSConnection",
"HTTPException", "NotConnected", "UnknownProtocol",
"UnknownTransferEncoding", "UnimplementedFileMode",
@ -411,7 +409,7 @@ class HTTPResponse:
self.length = None
self.chunked = 0
self.will_close = 1
self.msg = HTTPMessage(StringIO())
self.msg = HTTPMessage(io.BytesIO())
return
self.msg = HTTPMessage(self.fp, 0)