From c119ccfd4b3c04f1b838843fbf81cc0cb7472a73 Mon Sep 17 00:00:00 2001 From: swee Date: Tue, 14 Jan 2025 15:51:03 -0800 Subject: [PATCH] Update server.py --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index 7ebc475..c21c7d2 100644 --- a/server.py +++ b/server.py @@ -55,6 +55,7 @@ def relay(): else: gemcontent_binary.append(i) if "\n" in bytes(mtype).decode() and not found: + found = True ok = bytes(mtype).decode().split(" ")[0][0] == "2" mimetype = bytes(mtype).decode().replace("\r", "").split("\n")[0].split(" ")[1].split(";")[0] except: @@ -65,7 +66,6 @@ def relay(): binary = True print(traceback.format_exc()) if binary: - print(gemcontent_binary) return Response(bytes(gemcontent_binary), mimetype="text/gemini" if mimetype=="" else mimetype) received = received.replace("\r", "") firstline = True