Update server.py
This commit is contained in:
parent
64cdeb2157
commit
fe4af6b34b
1 changed files with 1 additions and 2 deletions
|
@ -53,7 +53,6 @@ def relay():
|
||||||
found = True
|
found = True
|
||||||
mimetype = bytes(gemraw).decode()[:-1].split(" ")[1]
|
mimetype = bytes(gemraw).decode()[:-1].split(" ")[1]
|
||||||
ok = bytes(gemraw).decode()[:-1].split(" ")[0][0] == 2
|
ok = bytes(gemraw).decode()[:-1].split(" ")[0][0] == 2
|
||||||
print(mimetype)
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
|
@ -65,7 +64,7 @@ def relay():
|
||||||
binary = True
|
binary = True
|
||||||
except:
|
except:
|
||||||
return f'<!DOCTYPE html>\n<html><head><meta charset="UTF-8"><link rel="stylesheet" href="/style.css"><title>Something went wrong...</title></head><body><h1>Something went wrong...</h1><p>The file that the Gemini server sent couldn\'t be decoded by Gem2Browser.</p></body></html>'
|
return f'<!DOCTYPE html>\n<html><head><meta charset="UTF-8"><link rel="stylesheet" href="/style.css"><title>Something went wrong...</title></head><body><h1>Something went wrong...</h1><p>The file that the Gemini server sent couldn\'t be decoded by Gem2Browser.</p></body></html>'
|
||||||
print(num)
|
print(mimetype)
|
||||||
if num == 1:
|
if num == 1:
|
||||||
print(mimetype)
|
print(mimetype)
|
||||||
for i in bytes(gemraw):
|
for i in bytes(gemraw):
|
||||||
|
|
Loading…
Add table
Reference in a new issue