mirror of https://gitlab.com/bashrc2/epicyon
Try different decode
parent
fb49707a72
commit
1bc8914973
|
@ -2653,7 +2653,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# why don't we just use msg.is_multipart(), rather than splitting?
|
# why don't we just use msg.is_multipart(), rather than splitting?
|
||||||
# TL;DR it doesn't work for this use case because we're not using
|
# TL;DR it doesn't work for this use case because we're not using
|
||||||
# email style encoding message/rfc822
|
# email style encoding message/rfc822
|
||||||
messageFields=msg.get_payload(decode=False).split(boundary)
|
print('msg.get_payload1: '+msg.get_payload(decode=False))
|
||||||
|
print('msg.get_payload2: '+msg.get_payload(decode=True).decode('utf-8'))
|
||||||
|
messageFields=msg.get_payload(decode=True).decode('utf-8').split(boundary)
|
||||||
fields={}
|
fields={}
|
||||||
filename=None
|
filename=None
|
||||||
attachmentMediaType=None
|
attachmentMediaType=None
|
||||||
|
@ -3118,7 +3120,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
postBytes=self.rfile.read(length)
|
postBytes=self.rfile.read(length)
|
||||||
|
|
||||||
msg = email.parser.BytesParser().parsebytes(postBytes)
|
msg = email.parser.BytesParser().parsebytes(postBytes)
|
||||||
messageFields=msg.get_payload(decode=False).split(boundary)
|
messageFields=msg.get_payload(decode=True).decode('utf-8').split(boundary)
|
||||||
fields={}
|
fields={}
|
||||||
filename=None
|
filename=None
|
||||||
lastImageLocation=0
|
lastImageLocation=0
|
||||||
|
|
Loading…
Reference in New Issue