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