34 Commits

Author SHA1 Message Date
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