1832 Commits

Author SHA1 Message Date
HoneyryderChuck
7528b607f8 missing in changelog line 2022-03-06 17:27:31 +00:00
HoneyryderChuck
35d9c15f44 bumped version to 0.19.4 v0.19.4 2022-03-06 17:22:17 +00:00
HoneyryderChuck
f01b543d79 Merge branch 'jruby-openssl-h2' into 'master'
Native JRuby h2 support

See merge request honeyryderchuck/httpx!197
2022-03-06 16:51:28 +00:00
HoneyryderChuck
552d0d859c fix truffleruby build 2022-03-06 16:33:35 +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
c989a14435 native resolver fix: do not signal interests when there's nothing to do (was generating bursty IO) 2022-03-06 15:40:48 +00:00
HoneyryderChuck
b3ddad06e5 resolver: do not mutate early resolve addresses, as it may mutate cached results 2022-03-05 23:15:59 +00:00
HoneyryderChuck
d77a5cb50e fix: only go with the coalesce path if the connections actually coalesced 2022-03-05 23:14:33 +00:00
HoneyryderChuck
e9a81d6b16 enabled h2 tests which were blocked for jruby 2022-03-05 17:33:37 +00:00
HoneyryderChuck
8eee10be21 regenerated test certs, keeping ca.crt around this time 2022-03-04 23:43:05 +00:00
HoneyryderChuck
a4a60290ac jruby: add test root certificate via keytool 2022-03-04 23:43:05 +00:00
HoneyryderChuck
0e6e879eef removing ffi-based custom openssl for jruby 2022-03-03 12:46:29 +00:00
HoneyryderChuck
411e8d0ab1 fixed linting 2022-02-24 01:27:06 +00:00
HoneyryderChuck
4e9c775e86 Merge branch '2022-02-23-fix-webmock-adapter-to-build-uri-with-query' into 'master'
Fix `WebMock` adapter to use `request.query` to build request signature

See merge request honeyryderchuck/httpx!196
2022-02-24 01:14:32 +00:00
Thomas Cannon
f7bcc27385
Fix WebMock adapter to use request.query to build request signature
* Webmock allows users to stub a request using a URI with query
	parameters, as a shortcut instead of using `with...`
	* The Webmock adapter did not construct a URI that included the
		`request.query`, causing stubs that had the same host/path, but
		different queries, to return incorrect results
2022-02-23 11:08:59 -05:00
HoneyryderChuck
890320e0bd bumped version to 0.19.3 v0.19.3 2022-02-21 16:27:31 +00:00
HoneyryderChuck
eeeac1f785 Merge branch 'issue-184' into 'master'
bugfix: bust cache lookup if returned set from different ip family

Closes #184

See merge request honeyryderchuck/httpx!195
2022-02-20 23:01:27 +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
f508fc32c9 Merge branch 'pcriv-master-patch-67803' into 'master'
Allow retry_after to be a Float

See merge request honeyryderchuck/httpx!194
2022-02-14 17:37:08 +00:00
Pablo Crivella
f5a8e60d43 Allow retry_after to be a Float 2022-02-14 12:56:14 +00:00
HoneyryderChuck
b1a7e425ce bumped version to 0.19.2 v0.19.2 2022-02-13 15:06:02 +00:00
HoneyryderChuck
1fd9cbc83e tests: disable auto-compaction for mimemagic-related tests
mimemagic seems to corrupt memory under auto-compaction, so disabling it
until it's fixed.

https://github.com/mimemagicrb/mimemagic/issues/166
2022-02-13 15:02:54 +00:00
HoneyryderChuck
84a4e2109c fix: skip resolution delay path for early resolve cases
when the early resolve path (using IP, /etc/hosts IP, IP from cache) is
followed, emit_addresses is called, and in a particular case (dual-stack
network but using an IPv4 address), the happy eyeballs resolution delay
path was activated when it shouldn't (it's meant to be used only for DNS
network requests), and resulted in @pool being called before it was ever
set.

This simple check ensures that it doesn't happen before it must.

Closes #182
2022-02-13 14:41:43 +00:00
HoneyryderChuck
6470728c42 Merge branch 'issue-181' 2022-02-11 18:02:14 +00:00
HoneyryderChuck
8436648b64 added versioning policy notes v0.19.1 2022-02-11 18:00:37 +00:00
HoneyryderChuck
eda4ad5bc3 bumped version to 0.19.1 2022-02-11 17:56:41 +00:00
HoneyryderChuck
0e9a964fe1 fix: resolver may return a nil, which needs to be filtered out 2022-02-11 17:56:05 +00:00
HoneyryderChuck
d1fc9b57e7 missing post image 2022-02-02 14:20:03 +00:00
HoneyryderChuck
2152b2f151 post: 0.19.0 announcement v0.19.0 2022-02-02 11:48:22 +00:00
HoneyryderChuck
282edc08b4 bumped version to 0.19.0 2022-02-02 11:48:06 +00:00
HoneyryderChuck
2abcc48a6e compile curl-to-ruby script in CI 2022-02-02 01:58:00 +00:00
HoneyryderChuck
a46fb03426 Merge branch 'issue-162' into 'master'
Curl to httpx widget

Closes #162

See merge request honeyryderchuck/httpx!193
2022-02-01 23:24:53 +00:00
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
5c9d51023a somehow jruby's not ignoring this... 2022-02-01 13:24:05 +00:00
HoneyryderChuck
66b4689c59 added support for json 2022-02-01 13:17:18 +00:00
HoneyryderChuck
d239e40b72 several improvs, added pre-baked commands 2022-01-29 19:01:19 +00:00
HoneyryderChuck
07dc8726d4 integrated compiled script in the main page as an input curl-to-ruby example 2022-01-24 10:38:16 +00:00
HoneyryderChuck
f018d34d0c initial draft of curl_to_httpx streak 2022-01-20 02:26:12 +02:00
HoneyryderChuck
af1292ac90 Merge branch 'issue-154-2' into 'master'
Happy Eyeballs v2

Closes #154

See merge request honeyryderchuck/httpx!181
2022-01-16 23:13:04 +00:00
HoneyryderChuck
6f7f7933c3 proc no lambda 2022-01-17 00:59:01 +02: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
4641797a7f added support for resolve timeout in the system resolver 2022-01-16 22:54:56 +02:00
HoneyryderChuck
c17a260fe8 fix: resolv with host file order + tcp connect issue
the early_resolve can't rely on separate by-family resolve logic.
Therefore, the addresses coming from there should be emitted with the
proper sort (ipv6 addresses last).

Also, fixed an issue with tcp connect where the socket wasn't being
reinitialized before the new attempt, thereby retrying to connec on the
same address that failed.
2022-01-16 22:54:56 +02:00
HoneyryderChuck
554957f6ca initial reimplementation of the system resolver, now using getaddrinfo
the ruby `resolver` library does everthing in ruby, and sequentially
(first ipv4 then ipv6 resolution). we already have native for that, and
getaddrinfo should be considered the ideal way to use DNS (potentially
in the future, it becomes the default resolver).
2022-01-16 22:54:56 +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
82b0a4bf28 fix: https resolver should close when no more outstanding connections are around 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
71920157f4 fix: ensuring that the https resolver is using the pool it's being created in 2022-01-16 22:54:56 +02:00