before, it was evaluating all names in the queue, but that was not accurate due to candidates, so there was always a candidate with a lower timeout; instead, one relies on the preexisting @name, wihch was already point to the currently being resolved name, and use it as proxy to get the correct timeotus list. This also results in performance improvement
a case was reported where a goaway error was received with a cancel error code; this code seems to have been misused by the peer server, since it is a stream error code, however the client should react to it by just closing it anyway, as the http2 parser already moved on to half-closed anyway, so not accepting new streams anymore
fixes github.com/HoneyryderChuck/httpx/issues/102
the previous patch was only considering the current inflight request and the pending requests, but in a scenario where multiple requests may have been buffered and considered in theory in-flight, this information would pass by, leading to a busy loop
while this type of error is avoided when doing HEv2, the IPs remain
in the cache; this means that, one the same host is reached, the
IPs are loaded onto the same socket, and if the issue is IPv6
connectivity, it'll break outside of the HEv2 flow.
this error is now protected inside the connect block, so that other
IPs in the list can be tried after; the IP is then evicted from the
cachee.
HEv2 related regression test is disabled in CI, as it's currently
reliable in Gitlab CI, which allows to resolve the IPv6 address,
but does not allow connecting to it
in case of multiple connections to the same server, where the server may have closed all of them at the same time, a request will fail after checkout multiple times, before starting a new one where the request may succeed. this patch allows the prior attempts not to exhaust the number of possible retries on the request
it does so by marking the request as ping when the connection it's being sent to is marked as inactive; this leverages the logic of gating retries bookkeeping in such a case
Closes https://github.com/HoneyryderChuck/httpx/issues/92
since pools can keep multiple persistent connections which may have been terminated by the peer already, exhausting the one retry attempt from the persistent plugin may make request fail before trying it on an actual connection. in this patch, requests which are preceded by a PING frame used for probing are therefore marked as such, and do not decrement the attempts counter when failing
When:
1. the proxy is autodetected from `http_proxy` etc. variables;
2. a request is made which bypasses the proxy (e.g. to an authority in `no_proxy`);
3. this request fails with one of `Proxy::PROXY_ERRORS` (timeout or a system error)
the `fetch_response` method tried to access the proxy URIs array which
isn't initialized by `proxy_options`. This change fixes the
`proxy_error?` check to avoid the issue.
due to how read timeouts are added on request transitions, timers may
enter the pool **before** a new tick happens, and are therefore
accounted for when the timers are fired after the current tick.
This patch resets the timer, which will force a new tick before they may
fire again.
this made several plugins unusable with the proxy plugin, because a lot
of them are dependent on Connection#send being called and overwritten.
This was done so to avoid piping requests when intermediate
connect-level parsers are in place. So in the way, when the conn is
initial, original send is closed; when not, which should almost never
happen, a second list is created, which is then piped when the
connection is established, back to original send.
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.
This type of lookup was guarded in the first DNS query lookup, however
after recursive CNAME queries, this could trigger a case where an AAAA
query would fetch cached A records, which would be filtered out but
still delivered.
Closs #184
to wait for.
Timeout calculation may trigger errors which lead to connection
unregistering, such as tital timeout errors. In such a case, we can end
up in a state where #select gets called with no timeout and no
selectable connections.
https://github.com/HoneyryderChuck/httpx/issues/3