2.2 KiB
0.23.0
Features
:retries
plugin: resumable requests
The :retries
plugin will now support scenarios where, if the request being retried supports the range
header, and a partial response has been already buffered, the retry will resume from there and only download the missing data.
HTTPX::ErrorResponse#response
As a result, ´HTTPX::ErrorResponse#response` has also been introduced; error responses may have an actual response. This happens in cases where the request failed after a partial response was initiated.
:buffer_size
option
A nnew option, :buffer_size
, can be used to tweak the buffers used by the read/write socket routines (16k by default, you can lower it in memory-constrained environments).
Improvements
:native
resolver falls back to TCP for truncated messages
The :native
resolver will repeat DNS queries to a nameserver via TCP when the first attempt is marked as truncated. This behaviour is both aligned with getaddrinfo
and the resolv
standard library.
This introduces a new resolver_options
option, :socket_type
, which can now be :tcp
if it is to remain the default.
Chore
HTTPX.build_request should receive upcased string (i.e. "GET")
Functions which receive an HTTP verb should be given he verb in "upcased string" format now. The usage of symbols is still possible, but a deprecation warning will be emitted, and support will be removed in v1.0.0 .
Remove HTTPX::Registry
These internal registries were a bit magical to use, difficult to debug, not thread-safe, and overall a nuisance when it came to type checking. While there is the possibility that someone was relying on it existing, nothing had ever been publicly documented.
Bugfixes
- fixed proxy discovery using proxy env vars (
HTTPS_PROXY
,NO_PROXY
...) being enabled/disabled based on first host uused in the session; - fixed
:no_proxy
option usage inn the:proxy
plugin. - fixed
webmock
adapter to correctly disable it whenWebmock.disable!
is called. - fixed bug in
:digest_authentication
plugin when enabled and no credentials were passed. - fixed several bugs in the
sentry
adapter around breadcrumb handling. - fixed
:native
resolver candidate calculation by putting absolute domain at the bottom of the list.