Avoid encode error

main
Bob Mottram 2021-07-27 20:53:24 +01:00
parent 4f58cc98c1
commit 6e7b508b80
1 changed files with 2 additions and 2 deletions

View File

@ -11267,7 +11267,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.translate,
self.server.baseDir,
actor, shareName,
callingDomain).encode('utf-8')
callingDomain)
if not msg:
if callingDomain.endswith('.onion') and \
self.server.onionDomain:
@ -11278,7 +11278,7 @@ class PubServer(BaseHTTPRequestHandler):
self._redirect_headers(actor + '/tlshares',
cookie, callingDomain)
return
msglen = len(msg)
msglen = len(msg.encode('utf-8'))
self._set_headers('text/html', msglen,
cookie, callingDomain)
self._write(msg)