Update server.py

This commit is contained in:
Nova Cat 2025-01-13 16:28:55 -08:00
parent ff4152d400
commit c299c15154

View file

@ -68,7 +68,7 @@ def relay():
return f'<!DOCTYPE html>\n<html><head><meta charset="UTF-8"><link rel="stylesheet" href="/style.css"><title>Something went wrong...</title></head><body><h1>Something went wrong...</h1><p>The specified Gemini server returned a status of: {i}</p></body></html>'
else:
firstline = False
if i.split(" ")[1] != "text/gemini":
if i.split(" ")[1].split(";")[0] != "text/gemini":
print("Unrecognised type: " + i.split(" ")[1])
return Response(" ".join(received.split("\n")[1:]), mimetype=i.split(" ")[1])
else: