]> git.the-white-hart.net Git - gemini/cbs-server.git/commitdiff
Send bytes instead of string main production
authorrs <>
Fri, 11 Jul 2025 03:31:42 +0000 (22:31 -0500)
committerrs <>
Fri, 11 Jul 2025 03:31:42 +0000 (22:31 -0500)
cbs-srv.py

index be2bb15baa16851dde3ee2562ed17ce185d80e04..2778b37de892b103e8a13984494d6e3c6e292d09 100755 (executable)
@@ -232,7 +232,7 @@ def main():
                 conn.sendall('{} {}\r\n'.format(x.code, x.meta).encode('utf-8'))
             except Exception as x:
                 logging.error('Exception: {}'.format(x))
                 conn.sendall('{} {}\r\n'.format(x.code, x.meta).encode('utf-8'))
             except Exception as x:
                 logging.error('Exception: {}'.format(x))
-                conn.sendall('40 Server error\r\n')
+                conn.sendall('40 Server error\r\n'.encode('utf-8'))
             conn.shutdown()
             conn.sock_shutdown(socket.SHUT_RDWR)
 
             conn.shutdown()
             conn.sock_shutdown(socket.SHUT_RDWR)