-
Notifications
You must be signed in to change notification settings - Fork 157
bug, different response content #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
same |
request image resource use requests import requests |
This pull request fixes the problem: |
Closed
diprog
added a commit
to diprog/python-tls-client-async
that referenced
this issue
May 12, 2025
…yte responses (e.g., images) by decoding base64 data) This PR fixes an issue where binary responses (such as images) were not handled correctly in `python-tls-client-async`. Previously, the response body was treated as plain text, leading to corrupted data when downloading binary content like PNGs or PDFs. The root cause was that the underlying Go library returns binary responses encoded in base64 if `isByteResponse=true`, but the Python code did not decode this properly. This patch: - Modifies `response.py` to split and decode base64-encoded bodies. - Ensures correct handling of binary responses (e.g., images). - Sets `"isByteResponse": True` in the session payload for consistency. Related issues: - FlorianREGAZ#83 - FlorianREGAZ#119 - FlorianREGAZ#117 - FlorianREGAZ#122 Thanks to @3droj7 for PR.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://sf16-sg.tiktokcdn.com/obj/eden-sg/uvkuhyieh7lpqpbj/pwa/192x192-1.png
if you request to this image url with requqests and tls_client.Session() , you will get different response.
and the png response from tls-client doesn't work.
The text was updated successfully, but these errors were encountered: