Update server.py
This commit is contained in:
parent
43804248bd
commit
c119ccfd4b
1 changed files with 1 additions and 1 deletions
|
@ -55,6 +55,7 @@ def relay():
|
|||
else:
|
||||
gemcontent_binary.append(i)
|
||||
if "\n" in bytes(mtype).decode() and not found:
|
||||
found = True
|
||||
ok = bytes(mtype).decode().split(" ")[0][0] == "2"
|
||||
mimetype = bytes(mtype).decode().replace("\r", "").split("\n")[0].split(" ")[1].split(";")[0]
|
||||
except:
|
||||
|
@ -65,7 +66,6 @@ def relay():
|
|||
binary = True
|
||||
print(traceback.format_exc())
|
||||
if binary:
|
||||
print(gemcontent_binary)
|
||||
return Response(bytes(gemcontent_binary), mimetype="text/gemini" if mimetype=="" else mimetype)
|
||||
received = received.replace("\r", "")
|
||||
firstline = True
|
||||
|
|
Loading…
Add table
Reference in a new issue