2159 Commits

Author SHA1 Message Date
HoneyryderChuck
835a851dd6 Merge branch 'faraday-tests' 2023-07-31 19:14:58 +01:00
HoneyryderChuck
1b9422e828 supporting faraday bind request option 2023-07-31 16:09:59 +01:00
HoneyryderChuck
2ef2b5f797 fix: set ssl verify to none when verify field is false (and ignore when nil) 2023-07-31 16:09:59 +01:00
HoneyryderChuck
7be554dc62 fix: faraday timeouts not being correctly mapped to httpx timeouts 2023-07-31 16:09:59 +01:00
HoneyryderChuck
b7a850f6da turn httpx timeout errors into faraday errors 2023-07-31 16:09:59 +01:00
HoneyryderChuck
b7d421fdcd fix for accessing wrong ivar 2023-07-31 16:09:59 +01:00
HoneyryderChuck
93b4ac8542 added tests to faraday adapter, for timeout and proxy based features 2023-07-31 16:09:59 +01:00
HoneyryderChuck
892dd6d37f bump version to 0.24.2 v0.24.2 2023-07-30 23:35:27 +01:00
HoneyryderChuck
6ae05006c6 fixes and improvements on the faraday adapter
* implement `Faraday::Adapter#build_connection´ (adapter seems to
  expect it)
* implement `Faraday::Adapter#close` (adapter seems to expect it)
* use `Faraday::Adapter#request_timeout` to translate faraday timeouts
  to httpx timeouts;
* ensure that the same HTTPX sesion object gets reused

In the process, also had to tweak the parallel manager, by
reimplementing the faraday APIs I was required to implement in the first
place, in order to obe able to reuse something (which just shows that
this faraday parallel API was poorly thought out).
2023-07-28 23:45:33 +01:00
HoneyryderChuck
f0167925ec fixing cheatsheet indication 2023-07-28 23:45:03 +01:00
HoneyryderChuck
afead02c46 eliminate deprecated MiniTest module 2023-07-27 00:02:11 +01:00
HoneyryderChuck
baab52f440 lax error check 2023-07-05 23:18:29 +01:00
HoneyryderChuck
1c04bf7cdb Merge branch 'master' of gitlab.com:os85/httpx 2023-07-05 23:03:39 +01:00
HoneyryderChuck
4b058cc837 replaced endpoint used to test udp-to-tcp dns upgrade 2023-07-05 22:55:08 +01:00
HoneyryderChuck
5bc2949a49 Merge branch 'issue-239' into 'master'
added #bearer_auth helper in authentication pluginn

Closes #239

See merge request os85/httpx!265
2023-07-03 21:31:39 +00:00
HoneyryderChuck
1a2db03c26 resolver_options: allow nameserver to be an hash descriminating dns server by socket family 2023-07-03 22:30:53 +01:00
HoneyryderChuck
17a26be1a9 added #bearer_auth helper in authentication pluginn 2023-07-02 22:23:07 +01:00
HoneyryderChuck
3ec44fd56a Merge branch 'native-resolver-bug-multi' into 'master'
fix for multi-hostname resolution with aliases failing

See merge request os85/httpx!264
2023-06-29 19:18:53 +00:00
HoneyryderChuck
ee6c5b231f fix for multi-hostname resolution with aliases failing
context of the multiple alias hops was cleaned up from the context,
which broke next query access.
2023-06-29 17:48:59 +01:00
HoneyryderChuck
255fc98d44 bumped version to 0.24.1 v0.24.1 2023-06-27 16:09:20 +01:00
HoneyryderChuck
4f0b41a791 revert rubocop regression change (fixed in latest) 2023-06-27 10:17:22 +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
85f0ac8ed3 bugfix: fix wrong super call for unexisting super method, when using the datadog plugin 2023-06-26 19:31:51 +01:00
HoneyryderChuck
e25ac201d2 updated cheatsheet examples 2023-06-26 19:27:48 +01:00
HoneyryderChuck
38b871aa8e Merge branch 'issue-238' into 'master'
proxy: fix incorrect connection #send definition never calling super

Closes #238

See merge request os85/httpx!262
2023-06-26 18:24:08 +00:00
HoneyryderChuck
0b18bb63e8 lint issue 2023-06-26 16:45:27 +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
244563720a proxy plugin: fail early if proxy scheme is not supported
The error which it was appearing when erroneously using "https" in a
proxy url was too cryptic.
2023-06-26 15:54:16 +01:00
HoneyryderChuck
886c091901 Merge branch 'fix-rubygems-website' into 'master'
Fix wrong homepage URL in rubygems

See merge request os85/httpx!263
2023-06-26 11:58:13 +00:00
Arash Mousavi
11942b2c74 Update file httpx.gemspec 2023-06-26 10:59:57 +00:00
HoneyryderChuck
b2848ea718 remove Style/RedundantCurrentDirectoryInPath cop support due to upstream bug 2023-06-25 01:22:50 +01:00
HoneyryderChuck
b9ee892b20 Merge branch 'datadog-improvements' into 'master'
datadog plugin: support env-based service name, set distributed tracing by default to true

See merge request os85/httpx!258
2023-06-15 22:27:59 +00:00
HoneyryderChuck
af457255ca datadog plugin: support env-based service name, set distributed tracing by default to true 2023-06-15 17:28:06 +01:00
HoneyryderChuck
0397d6d814 omit ntlm tests from recent ruby test pipelines (ciphers unsupported in recent openssl default mode) 2023-06-15 15:31:39 +01:00
HoneyryderChuck
4d61ba1cc2 bumped version to 0.24.0 v0.24.0 2023-06-15 12:58:38 +01:00
HoneyryderChuck
23fe515eac Merge branch 'moar-coverage' into 'master'
Moar coverage

See merge request os85/httpx!257
2023-06-14 14:53:14 +00:00
HoneyryderChuck
75bf8de36a fix: do not delete the algo digest header, required for negotiation 2023-06-13 17:44:54 +01:00
HoneyryderChuck
d24cf98785 add test for case when body only responds to #length 2023-06-13 17:43:00 +01:00
HoneyryderChuck
896253bcbc testing response cache internal store 2023-06-13 17:34:57 +01:00
HoneyryderChuck
32188352a5 test jitter with retries plugin 2023-06-13 17:13:51 +01:00
HoneyryderChuck
b9b2715b10 improve coverage of altsvc and resolver modules 2023-06-13 16:54:19 +01:00
HoneyryderChuck
7c1d7083ab Merge branch 'issue-236' into 'master'
`:response_cache` andd `:circuit_breaker` improvements

Closes #236

See merge request os85/httpx!255
2023-06-12 21:23:03 +00:00
HoneyryderChuck
bed0d03b9c do not cache closed responses, moar thread-safety
instead, copy the body; the buffer will keep a pointer to the same
original source, be it a string (for stringio) or a file descriptor
(for a file)
2023-06-12 20:42:57 +01:00
HoneyryderChuck
0555132740 integrate mutex_m in signatures 2023-06-12 20:42:57 +01:00
HoneyryderChuck
9342f983d5 improved coverage of response_cache plugin
and fixed a bug in the process
2023-06-12 20:42:57 +01:00
HoneyryderChuck
52082359f0 response_cache: eliminate stalled responses from cache
on read/write from/to store, take time to eliminate stalled responses from the given cache key
2023-06-12 20:42:57 +01:00
HoneyryderChuck
59cc0037fc response_cache: make the response store thread safe
The store is held by the session, which can be used in multithread
scenarios.
2023-06-12 20:42:57 +01:00
HoneyryderChuck
eb0291ed87 :circuit_breaker plugin: added support for .on_circuit_open callback
called when a circuit is open.

```ruby
HTTPX.plugin(:circuit_breaker).on_circuit_open do |req|
  # ... do smth
end
2023-06-12 20:42:57 +01:00
HoneyryderChuck
03059786b6 Merge branch 'fix-localhost-multihome-happy-eyeballs-connect' into 'master'
fix for happy eyeballs with early-resolved IPs

See merge request os85/httpx!254
2023-06-12 19:39:05 +00:00
HoneyryderChuck
1475f9a2ec fix for happy eyeballs with early-resolved IPs
for instance, in multi-homed networks, ´/etc/hosts` will have both
    "127.0.0.1" and "::1" pointing from localhost; still only one of
    them may be reachable, if a server binds only to "127.0.0.1", for
    exammple. In such cases, the early exit placed to prevent the loop
    from b0777c61e was preventing the dual-stack IP resolve to pass the
    second set of responses, thereby potentiallly making only the
    unreachable IP accessible to the connection.
2023-06-12 20:10:27 +01:00