45 Commits

Author SHA1 Message Date
HoneyryderChuck
340024fca6 moved test for bad coalescing into mainline
as coalescing can only run there
2025-11-03 23:07:27 +00:00
HoneyryderChuck
4c9db6f382 added test for #365 2025-11-03 22:53:37 +00:00
HoneyryderChuck
adfb7bcbdf remove more needless requires 2025-10-22 10:32:40 +01:00
HoneyryderChuck
8efdac53a4 refactor test to use start_test_servlet helper 2025-10-21 11:19:02 +01:00
HoneyryderChuck
b81b6a4a43 remove needless requires 2025-10-17 18:53:43 +01:00
HoneyryderChuck
9d6b24998c fix: make sure that the native resolver picks up the next timeout of the current hostname being resolved
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
2025-10-17 18:53:43 +01:00
HoneyryderChuck
cee84e1226 http2: aways emit goaway error and teardown the connection independent of the error code
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
2025-09-19 11:09:54 +01:00
HoneyryderChuck
8970767954 http1: also take into account buffered requests when looking for current context
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
2025-08-19 18:14:55 +01:00
HoneyryderChuck
ded1b90ae3 added test to reproduce the issue with the skipped query under the fiber scheduler 2025-08-19 18:14:55 +01:00
HoneyryderChuck
b0016525e3 recover from network unreachable errors when using cached IPs
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
2025-07-14 15:44:47 +01:00
HoneyryderChuck
cb78091e03 don't bookkeep retry attempts when errors happen on just-checked-out open connections
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
2025-05-28 15:25:50 +01:00
HoneyryderChuck
7a3d38aeee Merge branch 'issue-343' into 'master'
session: discard connection callbacks if they're assigned to a different session already

Closes #343

See merge request os85/httpx!379
2025-04-03 18:53:39 +00:00
HoneyryderChuck
54bb617902 fixed regression test of 1.4.1 (it detected a different error, but the outcome is not a goaway error anymore, as persistent conns recover and retry) 2025-04-03 18:34:41 +01:00
HoneyryderChuck
cf08ae99f5 removing unneded require in regression test which loads webmock by mistake 2025-04-03 18:23:56 +01:00
HoneyryderChuck
e40d3c9552 do not exhaust retry attempts when probing connections after keep alive timeout expires
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
2025-04-03 11:04:15 +01:00
HoneyryderChuck
999b6a603a adding reproduction of the report bug on issue-334 2025-03-03 18:12:03 +00:00
HoneyryderChuck
4a351bc095 adapted plugins to the new structure 2024-11-19 12:55:44 +00:00
Alexey Romanov
fda0ea8b0e Prevent NoMethodError in the proxy plugin
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.
2024-10-21 10:10:12 +01:00
HoneyryderChuck
8982dc0fe4 remove regression test 0.19.3
peers used for the test changed their TLS certificate config, and I can't find replacement peers.
2024-02-27 11:40:47 +00:00
HoneyryderChuck
18f2bea9b0 Merge branch 'issue-261' into 'master'
reset timer baseline interval when adding new timers

Closes #261

See merge request os85/httpx!290
2023-11-06 16:36:53 +00:00
HoneyryderChuck
e27301013d patching the setup of the on close callback instead
the previous patch allowed the callback to be called only once, whereas this one will be long-lived for the duration of the connection
2023-11-03 22:48:55 +00:00
HoneyryderChuck
f477871bfa reset timer baseline interval when adding new timers
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.
2023-11-03 12:12:05 +00:00
HoneyryderChuck
3f73d2e3ce multipart supported by default
the plugin was now moved to the transcoder layer, where it is available
from the get-go.
2023-09-20 17:57:41 +01:00
HoneyryderChuck
6baca35422 support has been removed 2023-09-20 17:57:41 +01:00
HoneyryderChuck
e4338979a6 rewrite regression test for proxy to use a local proxy using webrick 2023-06-26 20:19:39 +01:00
HoneyryderChuck
afbde420a7 proxy: fix incorrect connection #send definition never calling super
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.
2023-06-26 16:45:27 +01:00
HoneyryderChuck
092e594a4b Request.verb is now an upcased string (ex: "GET")
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.
2023-04-17 16:54:31 +03:00
HoneyryderChuck
7604d9deb9 adapt timeout of regression test 2023-01-25 00:58:49 +00:00
HoneyryderChuck
d0fcd13bf2 moving regression tests outside of docker 2023-01-25 00:58:49 +00:00
HoneyryderChuck
0a35b125f4 linting previous test 2023-01-25 00:58:49 +00:00
HoneyryderChuck
3729fc7de4 added test for the Happy Eyeballs v2 fix 2023-01-22 01:15:26 +00:00
HoneyryderChuck
d2a7cf3236 bug 0.19.3 regression: remove the actual HTTP requests from the tests
only the DNS part is relevant for the test, and performing the actual
requests fail intermitently in CI, making the pipelines fail constantly.
2022-03-06 16:18:13 +00:00
HoneyryderChuck
6dc4c9b2f0 bugfix: bust cache lookup if returned set from different ip family
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
2022-02-20 22:28:10 +00:00
HoneyryderChuck
120c895e25 typo 2022-01-15 01:38:14 +02:00
HoneyryderChuck
6ce9d16da4 fix backtrace set in regression test 2022-01-12 19:04:57 +02:00
HoneyryderChuck
b700a4f994 bootstrapping standalone tests, test which need to run in full-isolation mode (own process), where proxy intgration via env var is tested 2022-01-12 01:43:08 +02:00
HoneyryderChuck
d286bf5cc2 improving the env proxy test 2022-01-08 17:47:58 +02:00
HoneyryderChuck
5c019c440f added test for testing the env var proxy defs 2022-01-08 15:09:11 +02:00
HoneyryderChuck
edc2c4e6c4 do not loop forever if there are no connections to listen nor any timer
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
2021-12-09 15:02:32 +00:00
HoneyryderChuck
bb9da90bfa added regression test for bug fixed on 0.15.3 2021-07-11 17:09:13 +01:00
HoneyryderChuck
68955c14b0 added regression test to fix misbehaviour spotted before releasing 0.14.4 2021-06-02 22:56:46 +01:00
HoneyryderChuck
dbea29cca8 regressions for bugs fixed in 0.14.2 and 0.14.1 2021-06-02 19:00:14 +01:00
HoneyryderChuck
c9427ca21f renamed files 2021-06-02 18:59:49 +01:00
HoneyryderChuck
537a2be178 added regression test for bug released with 0.14.3 2021-06-02 18:44:05 +01:00
HoneyryderChuck
a14fa26c7c added new regression testing task 2021-06-02 18:44:05 +01:00