Update server.py
This commit is contained in:
parent
602e6909b9
commit
31294aafb2
1 changed files with 1 additions and 2 deletions
|
@ -41,8 +41,7 @@ def relay():
|
|||
if num == 0:
|
||||
try:
|
||||
mimetype = gemresponse.decode().replace("\r","").split("\n")[0].split(" ")[1].split(";")[0]
|
||||
print(gemresponse.decode().replace("\r","").split("\n")[0].split(" ")[0])
|
||||
ok = gemresponse.decode().replace("\r","").split("\n")[0].split(" ")[0][0] != "2"
|
||||
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:
|
||||
|
|
Loading…
Add table
Reference in a new issue