bug in the streaming detection would sometimes make valid http request fail

This commit is contained in:
Lionel Dricot 2022-03-25 20:53:45 +01:00
parent ad56f82901
commit a227d7d000
1 changed files with 1 additions and 4 deletions

View File

@ -2026,10 +2026,7 @@ class GeminiClient(cmd.Cmd):
body = response.content
response.close()
if mime and "text/" in mime:
#body = response.text
body = response.content.decode("UTF-8","replace")
else:
body = response.content
body = body.decode("UTF-8","replace")
gi.write_body(body,mime)
return gi