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