From 8a61986dad416a8cad982778a9d815aada645103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Tue, 9 Jul 2019 13:25:50 +0200 Subject: [PATCH] fixed httpserver for python3 compat --- actors/src/udsactor/httpserver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actors/src/udsactor/httpserver.py b/actors/src/udsactor/httpserver.py index 7b4c3d16..a59392f7 100644 --- a/actors/src/udsactor/httpserver.py +++ b/actors/src/udsactor/httpserver.py @@ -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)