Update server.py

This commit is contained in:
Nova Cat 2025-01-12 22:46:09 -08:00
parent cad796a5f4
commit ad9769fe45

View file

@ -44,7 +44,7 @@ def relay():
received = ""
while True:
gemresponse = gemsocket.recv(2048)
if gemresponse:
if gemresponse != "":
received += gemresponse.decode()
else:
break
@ -85,7 +85,6 @@ def relay():
title = "gemini://" + url
except:
code += traceback.format_exc()
print(code)
return f'<!DOCTYPE html>\n<html><head><meta charset="UTF-8"><link rel="stylesheet" href="https://swee.codes/style.css"><title>{title}</title></head><body>{code}</body></html>'
# Run the Hypercorn ASGI server