From 6e7b508b804529473869b4575910ca76406a798d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 27 Jul 2021 20:53:24 +0100 Subject: [PATCH] Avoid encode error --- daemon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon.py b/daemon.py index f5c5aa2fa..ff8ac3128 100644 --- a/daemon.py +++ b/daemon.py @@ -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)