Update server.py
This commit is contained in:
parent
d7228ccc13
commit
8a19ff1828
1 changed files with 3 additions and 4 deletions
|
@ -46,18 +46,17 @@ def relay():
|
|||
else:
|
||||
break
|
||||
found = False
|
||||
gemraw = bytes(gemraw)
|
||||
gemcontent_binary = bytearray()
|
||||
mtype = bytearray()
|
||||
for i in gemraw:
|
||||
for i in bytes(gemraw):
|
||||
try:
|
||||
if not found:
|
||||
mtype += i
|
||||
else:
|
||||
gemcontent_binary += i
|
||||
if "\n" in bytes(mtype).decode() and not found:
|
||||
ok = bytes(mtype).decode().split(" ")[0][0] == "2"
|
||||
mimetype = bytes(mtype).decode().split(" ")[1].split(";")[0]
|
||||
elif found:
|
||||
gemcontent_binary += i
|
||||
except:
|
||||
binary = True
|
||||
print(traceback.format_exc())
|
||||
|
|
Loading…
Add table
Reference in a new issue