539 Commits

Author SHA1 Message Date
HoneyryderChuck
fc977a7c83 adding git, because bundler still requires it even if alt-ruby should not download dep 2022-02-01 23:03:59 +00:00
HoneyryderChuck
81d399a324 updated test certs (expired) 2022-02-01 22:54:59 +00:00
HoneyryderChuck
b5b0e89dd1 on Response.response=, check if it's an error before expecting to use Response API; this triggers a second exception which won't be propagated and causes a loop 2022-02-01 22:48:42 +00:00
HoneyryderChuck
037994514b reworked early_resolve to work with dual-stack
for multi-backed resolvers, resolving is attempted before sending it to
    the resolver. in this way, cached, local or ip resolves get
    propagated to the proper resolver by ip family, instead of the
    previous mess.

    the system resolver doesn't do these shenanigans (trust getaddrinfo)
2022-01-17 00:56:09 +02:00
HoneyryderChuck
2940323412 implemented happy eyeballs v2 (rfc8305) for native and https resolver
Two resolver are kept (IPv6/IPv4) along in the pool, to which all
names are sent to and read from in the same pool. IPv4 resolves are
subject to a 50ms delay (as per rfc) before they're used for connecting.
IPv6 addresses have preference, in that if they arrive before the delay,
they are immediately used. If they arrive after the delay, they do not
interrupt the connection, but they'll be the next-in-line in case
connection handshake fails.

Two resolvers are kept, but the inherent Connection will be shared,
thereby sending name resolving requests to the same HTTP/2 connection in
bulk. The resolution delay logic from above also applies.

Currently handles resolving via `resolv` lib. This happens synchronously
though, so we're not there yet.
2022-01-16 22:54:56 +02:00
HoneyryderChuck
06b162b6ea applying a resolver manager to hold the different family type resolvers for the pool. This allows to have multiple resolvers per type, i.e. IPv6 and IPv4 2022-01-16 22:54:56 +02:00
HoneyryderChuck
bfb51cf213 isolate debug log tests 2022-01-16 03:29:46 +02:00
HoneyryderChuck
770fdefc9d added extra test for logging errors 2022-01-16 02:29:48 +02:00
HoneyryderChuck
91a106db54 log test improvements: test with higher level, test tty and non-tty 2022-01-16 02:29:38 +02:00
HoneyryderChuck
6369d9af72 fix CI script and assertion helper for headers 2022-01-15 01:38:14 +02:00
HoneyryderChuck
c3d20c6107 assertion helper: explicit string there to chase very rare CI failure 2022-01-12 15:50:44 +02:00
HoneyryderChuck
779171106b refactoring CI test suite
* run linting first (finish fast if code is unaligned), only on ruby 3.1
* run standalone and regression tests only on CRuby
* do not enable rbs if in jit mode (we should not slow down jits)
2022-01-12 15:50:44 +02:00
HoneyryderChuck
317ed07dba added tests for all supported mime type detectors 2022-01-12 15:50:44 +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
55464c16c3 removing faraday tests relying on multipart middleware, as it's been removed from core 2022-01-08 15:09:11 +02:00
HoneyryderChuck
d3b36c5668 added support for HTTP/2 proxy by simplifying the overall http proxy implementation 2022-01-07 12:26:26 +02:00
HoneyryderChuck
dea70478ea faraday: added support for #on_data 2021-12-22 16:01:48 +02:00
HoneyryderChuck
f3cff86775 cleaning up state within an http2 connection receiving a goaway, to properly mark it to be close; this will prevent unfinished pending requests to fall in the same connection, resulting in an unrecoverable internal state error 2021-11-19 16:24:50 +00:00
HoneyryderChuck
5a61586fd5 do not ignore goaway with no errors sent by the server, let the connection go down
raise a specific error for this, which will make it easier to rescue
from.
2021-11-18 18:07:12 +00:00
HoneyryderChuck
f31b06c150 improving servlet layer to be able to quickly build an HTTP2 test server 2021-11-17 21:34:16 +00:00
HoneyryderChuck
17d05e987d fixed cond around waiting for localstack to come up again 2021-11-14 02:56:32 +00:00
HoneyryderChuck
34405df522 skipping vary test 2021-10-02 01:21:40 +01:00
HoneyryderChuck
8f00539d6d bigger delta overall for timer-based tests 2021-10-02 00:19:53 +01:00
HoneyryderChuck
911c803d83 added test for vary header handling 2021-10-01 23:38:38 +01:00
HoneyryderChuck
a60fde07d6 added plugin tests, and the plugin body 2021-10-01 23:38:38 +01:00
HoneyryderChuck
a076da6549 disable h2 upgrade test for 2.3 2021-10-01 22:29:41 +01:00
HoneyryderChuck
c2131c8e41 disable ssl verify for nghttp2, letsencrypt expired cert + old openssl, thx 2021-10-01 18:00:34 +01:00
HoneyryderChuck
01efc4405c usinng better base images 2021-09-30 02:27:10 +01:00
HoneyryderChuck
edf7357a5f improved persistent plugin test, in order to test not only the number of connections kept, but the ones actually being used for selecting (connections with no request shouldn't) 2021-09-25 00:44:31 +01:00
HoneyryderChuck
13e865e488 hiding monotonic time funcs under the utils API 2021-09-20 16:16:20 +01:00
HoneyryderChuck
f768cf7a0e Improving API compatibility and error checking in responses
* `Response#error`, which, coupled with `ErrorResponse#error`, allows
  for `if response.error` kind of conditional;
* `Response#raise_for_status` now returns the response when no error is
  raise (for method chaining);

Closes #153
2021-09-20 13:02:20 +01:00
HoneyryderChuck
dce5c22fa0 fixing latest rubocopz 2021-09-20 12:37:48 +01:00
HoneyryderChuck
cebb606964 fixing jitter-based test assertion 2021-09-12 23:16:08 +01:00
HoneyryderChuck
3b85678834 Merge branch 'issue-150' into 'master'
retries: apply some jitter on the retry after value

Closes #150

See merge request honeyryderchuck/httpx!167
2021-09-12 16:37:52 +00:00
HoneyryderChuck
579ee4d0cc retries: apply some jitter on the retry after value 2021-09-12 16:10:50 +01:00
ojab
6f3b11eb16
Fixup decoders content type checks 2021-09-10 15:53:38 +00:00
HoneyryderChuck
d350bebe81 integrating .sum and .filter_map + backports 2021-09-04 15:25:14 +01:00
HoneyryderChuck
0575c87dec added example blocks to class_eval defs 2021-09-03 12:52:26 +01:00
HoneyryderChuck
c95e926886 auto-corrected the easy ones first 2021-09-03 12:24:18 +01:00
HoneyryderChuck
1a0962615b only run rubocop for latest ruby
the rubocop configs have grown a bit unwieldy as more ruby versions are
deprecated by mainline. Given that rubocop is not a requisite for older
rubies (provided code works), let's keep linting consistency towards
more modern conventions
2021-08-31 16:58:38 +01:00
HoneyryderChuck
b9339a12ae targeting rbs with openssl 2021-08-31 13:50:29 +01:00
HoneyryderChuck
2cb3c395a8 innstallig iproute2, as it's no longer part of distro 2021-08-17 16:58:42 +01:00
HoneyryderChuck
f520785572 added content-type filtering to decoders 2021-08-10 13:50:34 +01:00
HoneyryderChuck
556c94a575 added multipart decooder, which overtakes on Response#form for multipart payloads 2021-08-09 15:54:25 +01:00
HoneyryderChuck
f2d3c1f09b added Response#form (supports only x-www-urlencoded for now) 2021-08-09 15:54:25 +01:00
HoneyryderChuck
e5a120111c added tests for json and form (also multipart) decoders 2021-08-09 15:54:24 +01:00
HoneyryderChuck
9d60b23aad fixed parser tests (those lines never trigger) 2021-08-05 15:03:49 +01:00
HoneyryderChuck
c8276f94f4 added tests for options to track allocation optimizations 2021-08-04 13:48:11 +01:00
HoneyryderChuck
953f2d0d13 fixed calculation of connection header when explicit connection header
is passed

also, fixed the test which was relying on the previous one-time-to_s
behaviour of responnse bodies.
2021-08-01 00:38:40 +01:00