#718: Agente OGAgent usa mensajes en UTF-8; actualizar definición de la API REST.

git-svn-id: https://opengnsys.es/svn/branches/version1.1@5256 a21b9725-9963-47de-94b9-378ad31fedc9
oglive
ramon 2017-04-03 12:29:57 +00:00
parent 02399e9dd4
commit b0b650035e
1 changed files with 3 additions and 3 deletions

View File

@ -104,10 +104,10 @@ class HTTPServerHandler(BaseHTTPRequestHandler):
def do_POST(self):
module, path, getParams = self.parseUrl()
# Tries to get json content
# Tries to get JSON content (UTF-8 encoded)
try:
length = int(self.headers.getheader('content-length'))
content = self.rfile.read(length)
content = self.rfile.read(length).decode('utf-8')
logger.debug('length: {}, content >>{}<<'.format(length, content))
postParams = json.loads(content)
except Exception as e: