Improved content encoding detection.
authorJon Parise <jon@indelible.org>
Tue, 3 Sep 2013 23:16:46 +0000 (16:16 -0700)
committerJon Parise <jon@indelible.org>
Tue, 3 Sep 2013 23:16:46 +0000 (16:16 -0700)
commitb9b5be7c4c78e02f83464d8e332a1bf819853b60
treef52f6e6f409bacd22e0636c978fe46f38029e4a5
parentd991fb032a7b92e6efe97a32f24b6e6d9ccfe84c
Improved content encoding detection.

get_encodings_from_content() can now detect HTML in-document content
encoding declarations in the following formats:

 - HTML5
 - HTML4
 - XHTML 1.x served with text/html MIME type
 - XHTML 1.x served as XML

Ref: http://www.w3.org/International/questions/qa-html-encoding-declarations
requests/utils.py
test_requests.py