2159 Commits

Author SHA1 Message Date
HoneyryderChuck
62a241b22e fix CI ruby 2.3 build which could not download iptables package 2023-04-25 22:34:05 +01:00
HoneyryderChuck
8db1557827 Merge branch 'fix-webmock-adapter-enable-disable-issue' into 'master'
Fix WebMock adapter so that it gets disabled when WebMock gets disabled

See merge request os85/httpx!247
2023-04-25 07:25:08 +00:00
Kevin Elliott
5108a6247f Fix WebMock adapter so that it gets disabled when WebMock gets disabled 2023-04-25 07:25:07 +00:00
HoneyryderChuck
a3add3c721 Merge branch 'fix-no-proxy' into 'master'
fix proxy discovery using proxy env vars

See merge request os85/httpx!242
2023-04-24 10:35:47 +00:00
HoneyryderChuck
673d210fd8 fix tests not being adjusted 2023-04-18 02:34:11 +03:00
HoneyryderChuck
1bc5d49d1d bugfix: sentry adapter breadcrumbs didn't work
wrong variable used, and wrong error message accessors. Added
regressioon tests with breadcrumbs enabled and error response test.
2023-04-18 02:09:12 +03:00
HoneyryderChuck
ee4caa552b bugfix: digest auth enabled session wasn't working if session did not have digest credentials setup yet 2023-04-18 02:08:21 +03:00
HoneyryderChuck
ba21f83827 improve coverage of cookie and aws authentication tests 2023-04-18 02:06:47 +03:00
HoneyryderChuck
5747bcab3a Merge branch 'issue-220' into 'master'
retries: allow for resuming requests using ranges

Closes #220

See merge request os85/httpx!244
2023-04-17 22:20:30 +00:00
HoneyryderChuck
9e355bc3d6 added improved type signatures to retries module 2023-04-18 01:08:39 +03:00
HoneyryderChuck
8105e1128e introduce :buffer_size option
this allows to tweak connection buffer sizes, which may help optimizing
memory usage, and in this case, test the resumable retries.

wip
2023-04-17 18:09:24 +03:00
HoneyryderChuck
cb523794d7 retries: allow for resuming requests using ranges
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.
2023-04-17 17:19:41 +03:00
HoneyryderChuck
312e8e83d3 store potentially existing partial response in ErrorResponse, whenever it gets instantiated 2023-04-17 17:19:41 +03:00
HoneyryderChuck
931fc614a1 Merge branch 'issue-219' into 'master'
Request.verb is now an upcased string (ex: "GET")

Closes #219

See merge request os85/httpx!245
2023-04-17 14:19:05 +00: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
dd3fb5e4a7 fixing versions.yml generator 2023-04-01 00:18:32 +01:00
HoneyryderChuck
ecc28e1d55 Merge branch 'version-links-to-website' into 'master'
Version links to website

See merge request os85/httpx!243
2023-03-31 15:54:10 +00:00
HoneyryderChuck
408b91bb1e generating versions.yml for the jekyll website 2023-03-31 16:23:01 +01:00
HoneyryderChuck
7f59b9498e backport URI::Generic.use_proxy? for older rubies 2023-03-30 23:04:48 +01:00
HoneyryderChuck
cbd695fb9c fix proxy discovery using proxy env vars
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?
2023-03-30 22:08:32 +01:00
HoneyryderChuck
df26c97e38 changed http based tests, added #scheme, using it to correctly set no proxy domain 2023-03-29 23:00:50 +01:00
HoneyryderChuck
8652d1978f bump version to 0.22.5 v0.22.5 2023-03-29 00:33:27 +01:00
HoneyryderChuck
5532d8eb73 Merge branch 'errors-native-resolver' into 'master'
happy eyeballs + connection handling fixes

Closes #228

See merge request os85/httpx!241
2023-03-28 23:22:09 +00:00
HoneyryderChuck
ea61cce815 print ruby version in tests 2023-03-29 00:12:19 +01:00
HoneyryderChuck
64903fca4e addded happy eyeballs example, since we can't add tests for it in the CI 2023-03-28 23:56:59 +01:00
HoneyryderChuck
b07117e16e treat tls errors as a connection error which HE2 should handle 2023-03-28 23:56:34 +01:00
HoneyryderChuck
487cac6eef do not test ruby 2.1 and 2.2 in CI
can't build the required docker imaged anymore...
2023-03-28 23:41:37 +01:00
HoneyryderChuck
499a87a8f1 fix sentry call 2023-03-28 02:01:53 +01:00
HoneyryderChuck
f744ae651b force "connect error" path on resolve errors for happy eyeballs
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.
2023-03-28 01:50:25 +01:00
HoneyryderChuck
1b0327261f do not rely on send being called just once
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
2023-03-28 01:40:34 +01:00
HoneyryderChuck
707e653883 using callbacks_for? on happy eyeballs error detection path 2023-03-28 01:39:41 +01:00
HoneyryderChuck
73f0d609b0 fix datadog tests, both gem version compare and error type
error type has been wrongly tested sofar. This commit fixes it.
2023-03-28 01:37:06 +01:00
HoneyryderChuck
3bcf5bd5f6 renewing certs 2023-03-27 23:00:58 +01:00
HoneyryderChuck
7a76af352b fix linting 2023-03-27 22:40:55 +01:00
HoneyryderChuck
15ccf27eb2 fix google-protobuf constraints 2023-02-27 22:43:31 +00:00
HoneyryderChuck
b803da48e1 updated datee for cookies test, as it's overdue 2023-02-27 19:18:01 +00:00
HoneyryderChuck
8559a3eef8 bumping version to 0.22.4 v0.22.4 2023-02-08 20:44:33 +00:00
HoneyryderChuck
f69af8ddfe Merge branch 'issue-227' into 'master'
happy eyeballs v2: fix bug of connection merging with itself

Closes #227

See merge request os85/httpx!240
2023-02-08 20:23:55 +00:00
HoneyryderChuck
18cb21888f linting error 2023-02-08 20:05:40 +00:00
HoneyryderChuck
ff59a4c279 happy eyeballs v2: fix bug of connection merging with itself
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.
2023-02-08 18:34:59 +00:00
HoneyryderChuck
bc975f7b9b Merge branch 'catlee/empty_parallel' into 'master'
Exit from run early if we have no handlers

Closes #226

See merge request os85/httpx!239
2023-02-03 16:02:55 +00:00
Chris AtLee
563b8e93c2 Exit from run early if we have no handlers
Fixes: #226
2023-02-03 10:18:16 -05:00
HoneyryderChuck
36017d7bf6 bump version to 0.22.3 v0.22.3 2023-01-25 12:23:56 +00:00
HoneyryderChuck
c99194e298 Merge branch 'improvs' 2023-01-25 00:59:07 +00:00
HoneyryderChuck
6881dd2bc4 disable ipv6 connectivity when ip address list does not contain an ip address which is also not sitelocal 2023-01-25 00:58:49 +00:00
HoneyryderChuck
7604d9deb9 adapt timeout of regression test 2023-01-25 00:58:49 +00:00
HoneyryderChuck
d7431e76a2 log ip family for logged dns answer 2023-01-25 00:58:49 +00:00
HoneyryderChuck
efaa0e8066 fix for delayed IPv4 from Happy Eyeballs coalescing after
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.
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