Skip to content

Commit

Permalink
bugfix raising Exceptions when debug=True (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
deedy5 authored Jan 29, 2024
1 parent f44137a commit 792b725
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion curl_cffi/curl.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def debug_function(curl, type: int, data, size, clientp) -> int:
if type in (CURLINFO_SSL_DATA_IN, CURLINFO_SSL_DATA_OUT):
print("SSL OUT", text)
elif type in (CURLINFO_DATA_IN, CURLINFO_DATA_OUT):
print(text.decode())
print(text.decode("utf-8", "replace"))
else:
print(text.decode(), end="")
return 0
Expand Down

0 comments on commit 792b725

Please sign in to comment.