Merge pull request #1 from michieldwitte/master
If the payload type is an octet-stream don't parse it as utf-8
This commit is contained in:
commit
9f608e46ea
1 changed files with 4 additions and 1 deletions
|
@ -113,6 +113,9 @@ class Serializer(object):
|
|||
raise AttributeError("Packet length %s, pos %s" % (length_packet, pos))
|
||||
message.payload = ""
|
||||
payload = values[pos:]
|
||||
if message.payload_type == defines.Content_types["application/octet-stream"]:
|
||||
message.payload = payload
|
||||
else:
|
||||
message.payload = payload.decode("utf-8")
|
||||
pos += len(payload)
|
||||
|
||||
|
|
Loading…
Reference in a new issue