From 8a19ff182867086d93d107aca63fc846b4140940 Mon Sep 17 00:00:00 2001 From: swee Date: Tue, 14 Jan 2025 15:42:03 -0800 Subject: [PATCH] Update server.py --- server.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server.py b/server.py index 4240a87..b289197 100644 --- a/server.py +++ b/server.py @@ -46,18 +46,17 @@ def relay(): else: break found = False - gemraw = bytes(gemraw) gemcontent_binary = bytearray() mtype = bytearray() - for i in gemraw: + for i in bytes(gemraw): try: if not found: mtype += i + else: + gemcontent_binary += i if "\n" in bytes(mtype).decode() and not found: ok = bytes(mtype).decode().split(" ")[0][0] == "2" mimetype = bytes(mtype).decode().split(" ")[1].split(";")[0] - elif found: - gemcontent_binary += i except: binary = True print(traceback.format_exc())