-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Detect content encoding if invalid charset was specified #2549
Conversation
Sorry, I don't understand your use case. |
@asvetlov I have rewrote the description :) |
Catching Local |
@asvetlov currently I am fetching sites by reading content by chunks and have to use "private" encoding = response._get_encoding() So it will be very handy to have such method as public helper. What do you think? |
Codecov Report
@@ Coverage Diff @@
## master #2549 +/- ##
==========================================
+ Coverage 97.08% 97.08% +<.01%
==========================================
Files 40 40
Lines 8135 8141 +6
Branches 1438 1439 +1
==========================================
+ Hits 7898 7904 +6
Misses 100 100
Partials 137 137
Continue to review full report at Codecov.
|
Aaah, makes sense. |
@asvetlov thanks for the advice! I'll think about implementation of detection encoding incrementally. It may be worth to implement this at the |
Well, let's merge the PR as is. |
Thanks! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
What do these changes do?
aiohttp.ClientResponse.get_encoding
method publicAre there changes in behavior for the user?
Autodetection of content encoding is now working even if content provided with invalid charset (such charset is taken as if it was not provided).
Related issue number
There are no any opened issues that will be resolved by merging this change.
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bug)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.