Update server.py
This commit is contained in:
parent
cad796a5f4
commit
ad9769fe45
1 changed files with 1 additions and 2 deletions
|
@ -44,7 +44,7 @@ def relay():
|
||||||
received = ""
|
received = ""
|
||||||
while True:
|
while True:
|
||||||
gemresponse = gemsocket.recv(2048)
|
gemresponse = gemsocket.recv(2048)
|
||||||
if gemresponse:
|
if gemresponse != "":
|
||||||
received += gemresponse.decode()
|
received += gemresponse.decode()
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
@ -85,7 +85,6 @@ def relay():
|
||||||
title = "gemini://" + url
|
title = "gemini://" + url
|
||||||
except:
|
except:
|
||||||
code += traceback.format_exc()
|
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>'
|
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
|
# Run the Hypercorn ASGI server
|
||||||
|
|
Loading…
Add table
Reference in a new issue