Update server.py
This commit is contained in:
parent
e0970523ad
commit
81dd648e35
1 changed files with 2 additions and 2 deletions
|
@ -38,14 +38,14 @@ def relay():
|
|||
while True:
|
||||
gemresponse = gemsocket.recv(2048)
|
||||
try:
|
||||
if num = 0:
|
||||
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("Non-ordinary type! " + mimetype)
|
||||
except:
|
||||
pass
|
||||
elif num = 1 and not mimetype in ["text/gemini", ""]:
|
||||
elif num == 1 and not mimetype in ["text/gemini", ""]:
|
||||
pass
|
||||
elif num >= 2 and not mimetype in ["text/gemini", ""]:
|
||||
for i in gemresponse:
|
||||
|
|
Loading…
Add table
Reference in a new issue