fixed httpserver for python3 compat

This commit is contained in:
Adolfo Gómez García 2019-07-09 13:25:50 +02:00
parent d068bcef60
commit 8a61986dad

View File

@ -116,8 +116,8 @@ class HTTPServerHandler(BaseHTTPServer.BaseHTTPRequestHandler):
try:
HTTPServerHandler.lock.acquire()
length = int(self.headers.getheader('content-length'))
content = self.rfile.read(length)
length = int(self.headers.get('content-length'))
content = self.rfile.read(length).decode('utf8')
logger.debug('length: {}, content >>{}<<'.format(length, content))
params = json.loads(content)