Skip to content
Snippets Groups Projects

FIX: new systems expect encoded body

Merged Henrik tom Wörden requested to merge f-encode into dev
Files
2
@@ -26,6 +26,7 @@ up a tcp connection."""
from __future__ import unicode_literals, print_function
from io import StringIO
from sys import hexversion
from .connection import CaosDBServerConnection, CaosDBHTTPResponse
@@ -56,7 +57,10 @@ class MockUpResponse(CaosDBHTTPResponse):
def read(self, size=-1):
"""Return the body of the response."""
return self.response.read(size)
if hexversion < 0x03000000:
return self.response.read(size)
else:
return self.response.read(size).encode()
def getheader(self, name, default=None):
"""Get the contents of the header `name`, or `default` if there is no
Loading