Highlights
๐ค Accurate file upload lengths
Passing a file as content= now calculates Content-Length from its remaining bytes, respecting the current file position (#1214).
๐ Reliable proxy TLS and HTTP/2 negotiation
TLS hostname overrides now apply inside HTTP proxy tunnels without affecting the proxy's own TLS connection (#1223). HTTP/2 is advertised first when enabled, and HTTP/1.1 is omitted when disabled (#1155).
๐งน Clean WebSocket shutdown
The sync WebSocket keepalive thread now exits cleanly when a ping races with connection shutdown (#1228).
httpx2
Fixed
- Calculate
Content-Lengthfrom the remaining bytes when a file is passed ascontent=, respecting its current position (#1214). - Stop the sync WebSocket keepalive thread cleanly when a ping races with connection shutdown (#1228).
httpcore2
Fixed
- Honor the
sni_hostnameextension for TLS inside HTTP proxy tunnels without applying it to the proxy's TLS connection (#1223). - Prefer HTTP/2 during TLS protocol negotiation when enabled, and stop advertising HTTP/1.1 when it is disabled (#1155).
Full Changelog: v2.13.0...v2.13.1