Update server.py

This commit is contained in:
Nova Cat 2025-01-13 21:55:55 -08:00
parent a33e4fef5a
commit 602e6909b9

View file

@ -41,7 +41,9 @@ def relay():
if num == 0:
try:
mimetype = gemresponse.decode().replace("\r","").split("\n")[0].split(" ")[1].split(";")[0]
if mimetype != "text/gemini".lower() and gemresponse.decode().replace("\r","").split("\n")[0].split(" ")[0][0] != "2":
print(gemresponse.decode().replace("\r","").split("\n")[0].split(" ")[0])
ok = gemresponse.decode().replace("\r","").split("\n")[0].split(" ")[0][0] != "2"
if mimetype != "text/gemini".lower() and ok:
print("Non-ordinary type! " + mimetype)
except:
pass