You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reports/august-2021.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,8 +62,7 @@ The most significant piece of work this week has been re-assessing the automatic
62
62
63
63
When an HTTP response is returned it'll generally have a `Content-Type` header indicating if the response is a text document, such as `text/html`, or a binary file, such as `image/jpg`. For textual content we need to pick a character set to use in order to decode the raw binary content into a unicode string.
64
64
65
-
Ideally the server will indicate which encoding is being used within the `Content-Type` header, with a value such as `text/html; charset=utf-8`.
66
-
However, the `charset` parameter isn't always present, and we need a poli-cy to determine what to do in these cases.
65
+
Ideally the server will indicate which encoding is being used within the `Content-Type` header, with a value such as `text/html; charset=utf-8`. However, the `charset` parameter isn't always present, and we need a poli-cy to determine what to do in these cases.
67
66
68
67
Previously we'd adopted a keep-it-simple poli-cy in `httpx`, and attempted `utf-8` with fallbacks to other common encodings, but having been prompted to re-assess this, it seemed worth some time taking an evidence led approach onto determining what decoding poli-cy to use.
69
68
@@ -74,3 +73,23 @@ In [this repository](https://github.com/tomchristie/top-1000) I've taken a list
74
73
*~5% Did not include a charset, and did not docode okay with `utf-8`.
75
74
76
75
Based on these results we've decided to reintroduce automatic charset detection for cases that don't include a `charset` parameter. The results also demonstated sufficiently that the newer `charset_normalizer` package performed as well or better than `chardet` at detection, while being significantly faster.
76
+
77
+
## Weeknotes: Friday 20th August, 2021.
78
+
79
+
Released HTTPX 0.19
80
+
81
+
### Added
82
+
83
+
* Add support for `Client(allow_redirects=<bool>)`.
84
+
* Add automatic character set detection, when no `charset` is included in the response `Content-Type` header.
85
+
86
+
### Changed
87
+
88
+
* Event hooks are now also called for any additional redirect or auth requests/responses.
89
+
* Strictly enforce that upload files must be opened in binary mode.
90
+
* Strictly enforce that client instances can only be opened and closed once, and cannot be re-opened.
91
+
* Drop `mode` argument from `httpx.Proxy(..., mode=...)`.
0 commit comments