HoneyryderChuck
2897179c44
removed .expired? dead code functions
...
not used anywhere. also, initialized an ivar in ssl class
2025-09-04 14:39:05 +01:00
HoneyryderChuck
b1be71bb7f
Merge branch 'fix-ttl-expired'
2025-09-04 13:57:41 +01:00
HoneyryderChuck
3ca9dc6feb
callbacks plugin: do not emit response_completed event if it's a response error
...
there's already the request_error for that
2025-09-04 13:57:04 +01:00
HoneyryderChuck
b27119cbc4
session: if found connection is closed and addresses expired, send it to resolve codepath
2025-09-04 13:57:04 +01:00
HoneyryderChuck
b1448019a6
resolver: adapt address intersection check to skip when original address list may be empty due to expired check
2025-09-04 13:57:04 +01:00
HoneyryderChuck
f194a97645
native and https: emit entry instances with correct ttl
2025-09-04 13:57:04 +01:00
HoneyryderChuck
e72e675627
calculate TTL immediately after receiving answer, instead of on cache set
2025-09-04 13:57:04 +01:00
HoneyryderChuck
f57770f3cd
when addresses expire, don't forget to decrease the index as well
2025-09-04 13:57:04 +01:00
HoneyryderChuck
1f2f77124d
init ivar @family
2025-09-04 13:57:04 +01:00
HoneyryderChuck
9731307d11
added test for dns entry ttl expired
2025-09-04 13:57:04 +01:00
HoneyryderChuck
adeb3ded50
cover other modules in plugin tests
2025-09-04 09:37:09 +01:00
HoneyryderChuck
e98c72e3c5
response buffer: increase coverage, fix buffer dup when tempfile, simplify == as buffer always responds to read
2025-09-04 09:37:09 +01:00
HoneyryderChuck
b42f1ae6b1
rename system_resolve to hosts_resolve
...
to not confuse with the system resolver, which uses getaddrinfo
2025-09-03 11:46:24 +01:00
HoneyryderChuck
f044bcbcc4
uncover overriden test, remove needless method redefinition
2025-09-03 11:46:14 +01:00
HoneyryderChuck
4ad017665a
fix circular reference issue around test modules for http helpers
2025-09-03 11:46:03 +01:00
HoneyryderChuck
37d41a149f
Merge branch 'redefinition' into 'master'
...
Fix method redefinition warnings
See merge request os85/httpx!406
2025-09-03 10:44:23 +00:00
Earlopain
e32e3f6ba4
Make class_eval
ed methods private when they are supposed to be
...
Even if it is called after `private`, they don't inherit visibility.
2025-09-03 11:23:57 +02:00
Earlopain
6e93530c7f
Fix method redefinition warnings
...
This was introduced in 7e9de9faf3
2025-09-03 10:30:38 +02:00
HoneyryderChuck
ec27524a3a
Merge branch 'shape-and-other-improvs' into 'master'
...
options: fix object shape performance issues
See merge request os85/httpx!399
2025-09-02 13:30:05 +00:00
HoneyryderChuck
64c26364a0
avoid intermediate hash in options initialization
2025-09-02 11:47:46 +01:00
HoneyryderChuck
e2c60ae7e1
init nil reference on request for better opt shape
2025-09-02 11:47:46 +01:00
HoneyryderChuck
c78c88b0f8
remove dependency on error having a connection in the faraday adapter
...
connection reference should not remain in the response which goes to the user, as that may leak the reference which will block garbage collection of objects in the selector
2025-09-02 11:47:46 +01:00
HoneyryderChuck
fbd1981a2d
options: add more sigs, align code a bit more
2025-09-02 11:47:46 +01:00
HoneyryderChuck
bb5681bfc7
missing status sig in http errors class
2025-09-02 11:47:46 +01:00
HoneyryderChuck
7e9de9faf3
options: cache options names in class var, use it to set ivars in a predictable order
...
the way it was setup, the options class was object shape unfriendly, as the order of creation of ivars was dependent on input and undeterministic; this change fixes it by storing the option names in an array in the class, properly allowing it for extension on plugin calls, freezing it on demand when necessary, and using it to find unsupported options in cases where the former implementation didn't
some code was juggled to delay certain instantiations for later, and option_ setters are now private, as they should
2025-09-02 11:47:46 +01:00
HoneyryderChuck
fc440a2486
faraday: remove needless override, centralize exception handling more
2025-09-02 11:30:18 +01:00
HoneyryderChuck
c2223c93dc
persistent plugin: make sure that #close closes connections in other threads
...
in case the session has been used across threads, per-thread selectors are left scattered, and #close would have only closed the caller thread selector; this will traverse remaining threads and close all selectors for the given session; it does it in a bit racy way, but it's preferable to document when it's safe to call the function instead, as it's supposed to be a dangerous call anyway
this should also improve the before-fork callback in cases where the session has been used across threads
2025-09-02 11:30:18 +01:00
HoneyryderChuck
3e40e7bdcb
Merge branch 'issue-322' into 'master'
...
drop ip addresses from persistent connections which ran out of TTL
Closes #322
See merge request os85/httpx!404
2025-09-02 10:30:06 +00:00
HoneyryderChuck
b5775d73c8
adding TCP#addresses?, which drops on-the-fly expired entries, and therefore makes possible to DNS query for persistent connections
2025-09-02 10:58:06 +01:00
HoneyryderChuck
cfce76bd8b
adding Resolver::Entry, using it everywhere internally
...
this acts as a delegator to ipaddr, and should be a drop-in replacement everywhere the ipaddress was used, with the extra information about expiration
2025-09-02 10:58:06 +01:00
HoneyryderChuck
de153bc995
decoupled form and multipart transcoder, moved check to Request::Body
2025-09-01 23:33:56 +01:00
HoneyryderChuck
6f71bd4a5b
Merge branch 'fiber-concurrency-plugin' into 'master'
...
fiber scheduler concurrency plugin
See merge request os85/httpx!400
2025-09-01 14:20:04 +00:00
HoneyryderChuck
34a1f7ca44
Session#deactivate: fix for when connections get deregistered from selector during the loop
...
as the selectables array may shrink during the loop as a result
2025-09-01 15:07:13 +01:00
HoneyryderChuck
f16e7e7e97
changed the plugin name to fiber_concurrency
...
same as in sequel
2025-09-01 13:12:20 +01:00
HoneyryderChuck
53a3ba7037
moved logic related with supporting the fiber scheduler into its own plugin
...
this plugin is loaded into the persistent plugin by default, as it's already expected to work across fibers
2025-09-01 11:43:30 +01:00
HoneyryderChuck
7f34a62b82
promoting native/system/https resolver classes into options
...
so that those can be extended in plugins
2025-09-01 10:21:23 +01:00
HoneyryderChuck
f9ae15379a
promoting http1 and http2 connection classes into options
...
this makes them extendable like other plugin classes, and the h2c plugin is rewritten to accomodate that requirement
2025-09-01 10:21:23 +01:00
HoneyryderChuck
d19f5150a1
move fiber selector logic from persistent plugin into its own sub-plugin
2025-09-01 10:21:23 +01:00
HoneyryderChuck
92e891919f
Merge branch 'issue-355' into 'master'
...
plugin init fixes: enforce usage of Options or hash for the second argument;...
Closes #355
See merge request os85/httpx!403
2025-09-01 09:18:14 +00:00
HoneyryderChuck
1c880127d7
Merge branch 'gh-98' into 'master'
...
pool fix: when connection is acquired after waiting on it, return it...
See merge request os85/httpx!402
2025-09-01 09:16:07 +00:00
HoneyryderChuck
f0329cf653
plugin init fixes: enforce usage of Options or hash for the second argument; ensure that plugin only continues loading if it is a module or converts to one
2025-08-24 01:26:24 +01:00
HoneyryderChuck
fb8ebd57d4
Merge branch 'issue-354' into 'master'
...
callbacks plugin: propagated callbacks to derived plugins
Closes #354
See merge request os85/httpx!401
2025-08-23 23:42:37 +00:00
HoneyryderChuck
09f1309dcf
pool fix: when connection is acquired after waiting on it, return it immediately, instead of bookkeeping on max connections
...
the previous state was acquiring the connection AND reacting on the number of available connections
2025-08-22 16:57:37 +01:00
HoneyryderChuck
34237705ab
callbacks plugin: propagated callbacks to derived plugins
...
same fix as done recently with #with, but different function
2025-08-22 16:25:21 +01:00
HoneyryderChuck
0643c696ab
fixing local proxy list urls
2025-08-22 16:11:44 +01:00
HoneyryderChuck
35afcc51f6
abstract IO#wait call to workaround the jruby bug
...
https://github.com/jruby/jruby/issues/8917
2025-08-19 23:55:48 +01:00
HoneyryderChuck
bb6907e4ee
Merge branch 'gh-94' into 'master'
...
Fixes and improvements for fiber scheduler integration
See merge request os85/httpx!395
2025-08-19 17:34:09 +00:00
HoneyryderChuck
14734d510e
align nil inits
2025-08-19 18:14:55 +01:00
HoneyryderChuck
09342187f5
removing fiber reference when emitting request completion event
2025-08-19 18:14:55 +01:00
HoneyryderChuck
8970767954
http1: also take into account buffered requests when looking for current context
...
the previous patch was only considering the current inflight request and the pending requests, but in a scenario where multiple requests may have been buffered and considered in theory in-flight, this information would pass by, leading to a busy loop
2025-08-19 18:14:55 +01:00