-
-
Notifications
You must be signed in to change notification settings - Fork 9.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
Incorrect encoding detected when no encoding is given #2042
Comments
This is well-known behaviour in requests, and comes right out of RFC-2616. We go into it here in the documentation, but in short: RFC 2616 says that if a Content-Type is received that is of type |
Is there a way to detect this fallback as a user of requests? |
Sure: fallback_to_latin1 = (not 'charset' in r.headers['Content-Type']) and (r.headers['Content-Type'].startswith('text/') |
Okay, thanks! |
With http://evertpot.com/http-11-updated/, could there be any change on this? |
@untitaker Way ahead of you, see #2086. =) |
On https://mozorg.cdn.mozilla.net/media/caldata/FrenchHolidays.ics, the encoding is set to
ISO-8859-1
, although no encoding was given in the headers, which is why i think it should beNone
instead.The text was updated successfully, but these errors were encountered: