Skip to content
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

If server doesn't specify an encoding, requests always tries to guess it #16

Closed
StevenMaude opened this issue May 19, 2014 · 2 comments · Fixed by #26
Closed

If server doesn't specify an encoding, requests always tries to guess it #16

StevenMaude opened this issue May 19, 2014 · 2 comments · Fixed by #26

Comments

@StevenMaude
Copy link
Contributor

The logging statement that uses response.text means that if a character encoding isn't specified in the response header, requests always guesses the encoding. This can be slow for large responses.

@StevenMaude
Copy link
Contributor Author

Just been burnt by this again; I'd be tempted to either remove this or add some condition that checks if logging is set to debug. chardet is painfully slow on large files.

@StevenMaude
Copy link
Contributor Author

And again...

StevenMaude added a commit that referenced this issue Mar 18, 2015
Fixes #16.

This can result in `chardet` being used even if the debug statement isn't
required which can be very slow on large responses (e.g. PDFs).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant