a new feature is introduced in the `retries` plugin, whereas if an error
occurred midway response payload transfer, and the peer server signaled
(via `"accept-ranges"`) that accepts range requests, the retried request
will attempt to start over from where the previous request left off.
The reference for a request verb is now the string which is used
everywhere else, instead of the symbol corresponding to it. This was an
artifact from the import from httprb, and there is no advantage in it,
since these strings are frozen in most use cases, and the
transformations from symbol to strings being performed everywhere are
prooof that keeping the atom isn't really bringing any benefit.
connections weren't being correctly initiated, as proxies were filtered
for the whole session based on URI.find_proxy for the first call. This
fixes it by:
* applying it to all used uris;
* falling back to proxy options instead;
* apply no_proxy option in case it's used, using
`URI::Generic.use_proxy?
without this, requests may not get merged between connections, and
callbacks aren't called.
multi resolver path gets simplified by this change, given that the
callbacks handle the bulk of happy eyeballs complexity.
the sentry and datadog plugins have been wrongly relying on the
assumption that #send is called just once, when in fact, it can be
called multiple times, both for conn exhaustion, as well as conn merging
(coalescing + happy eyeballs) scenarios.
Because of this, their "on response" callback could be set multiple times, which was confusing. So this fixes the behaviour.
Fixes#228
Given a sequence of events, where IPv4 and IPv6 addresses are emitted,
and IPv6 wins the race, the IPv4 may already be in an advanced state of
registering that it'll find the IPv6 connection, and it will coalesce
with it. In such a case, the `:tcp_open` callback will emitted for the
IPv6 connection, which will merge and shut itself down.
Ths caused hanging requests.
If the Ipv4 handshake works in dual stack, and there is an open
connection to be used, the tcp_open callback wasn't being called, and
the process halted. The fix was to emit :tcp_open before coalescing, as
this allows for the original conn state to be merged first with the new
conn, then with the connection to coalesce.