only read text/gemini file and give all the rest to the mime handler

This commit is contained in:
Lionel Dricot 2021-12-17 23:29:47 +01:00
parent e23f80ab28
commit 053502e214
1 changed files with 4 additions and 3 deletions

View File

@ -449,9 +449,10 @@ you'll be able to transparently follow links to Gopherspace!""")
#gmi Mimetype is not recognized yet
if not mime :
mime = "text/gemini"
with open(cached,'r') as file:
body = file.read()
file.close()
if mime == "text/gemini":
with open(cached,'r') as file:
body = file.read()
file.close()
else:
print("Content not available, marked for syncing")
with open(self.syncfile,mode='a') as sf: