Repository navigation
chore(deps): update dependency ethon to '~> 0.19.0' - #107
Merged
Merged
Conversation
renovate
Bot
force-pushed
the
renovate/ethon-0.x
branch
from
November 22, 2026 13:09
214cf3c to
b1e1d4b
Compare
Ethon 0.19 refuses any access to handles inherited across a fork and no longer frees them in the child itself. Only forget the parent's state after a fork and set up a new event loop with the next request.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #107 +/- ##
==========================================
- Coverage 97.35% 97.27% -0.08%
==========================================
Files 28 28
Lines 1171 1176 +5
==========================================
+ Hits 1140 1144 +4
- Misses 31 32 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
'~> 0.18.0'→'~> 0.19.0'Release Notes
typhoeus/ethon (ethon)
v0.19.2Compare Source
Full Changelog
Fixes and hardening
CURLOPT_POSTFIELDSIZEto 0 instead of -1 whenEasy#postfields=orEasy#copypostfields=clears the body. With a size of -1 libcurl treats thebody as indeterminate, sends the POST chunked, and reads it from the default
read callback, which is stdin, so the request waited until stdin was closed.
(#463)
Enhancements
Mirror
certinfo, so the certificate chain read withcertinfo: truesurvives the handle reset and reaches Typhoeus responses
(typhoeus/typhoeus#427)
Expose
Easy#primary_port,Easy#local_ip,Easy#local_port,Easy#ssl_verifyresult,Easy#num_connects,Easy#os_errno,Easy#http_connectcode,Easy#proxyauth_avail,Easy#condition_unmet,Easy#header_sizeandEasy#content_type. They are also included in themirror, so they survive the handle reset and show up in response options.
Everything in the mirror is read for every response, so the deprecated
filetime,lastsocketandcontent_length_*values and the RTSP and FTPentry informations are left out in favour of the
_tandactivesocketvariants that are already exposed.
(#460)
Add
Ethon::Multipart::Partfor setting the content type and, optionally,the filename of a single
multipart/form-datapart. Plain body values keeptheir existing behavior.
(typhoeus/typhoeus#494)
Add
Ethon::Curl.allow_handles_after_fork!, an opt-in for servers that forkworkers from a process that has already used libcurl and cannot
exec.Called in the child before its first handle, it lets the child create new
handles on the libcurl state it inherited instead of raising
Ethon::Errors::ForkSafety. Handles created before the fork are stillrejected, as is
Ethon::Curl.cleanupin the child, and the default isunchanged. The opt-in is not supported on macOS, where it raises
Ethon::Errors::ForkSafetyin a child whose parent initialized libcurl.(#462)
v0.19.1Compare Source
Full Changelog
Behavior changes
attached at once. libcurl derives its default
CURLMOPT_MAXCONNECTSfrom thenumber of handles attached when a connection is returned, but Ethon detaches
finished handles immediately, which made the default shrink during a run and
close connections that later requests could have reused. An explicit
maxconnects:still takes precedence.(#455)
Fixes and hardening
Easy#cleanupfrom anon_completecallback. The transfer hasfinished and a Multi detaches the handle before its callbacks run, so freeing
it is safe. Cleanup from body, header, and progress callbacks is still
rejected. This fixes
:resolverequests in Typhoeus 1.7.0, which clean upinstead of pooling to avoid leaking
CURLOPT_RESOLVEentries.(#456,
typhoeus#824)
v0.19.0Compare Source
Full Changelog
Before 1.0, a minor release may include incompatible API changes; review the
breaking changes before upgrading.
Breaking changes
NotImplementedErrorinstead ofbeing registered with the generic read/write callback signature. This affects
low-level setters such as
ioctlfunction=,seekfunction=, andopensocketfunction=. (#281)curl_multi_performnow raiseEthon::Errors::MultiPerforminstead of allowing Multi execution to continuewith invalid state. (#286)
forkcan no longer be used orcleaned up in the child process. Ethon now raises
Ethon::Errors::ForkSafety; if libcurl was initialized before forking, useforkplusexec, otherwise create handles after forking.(#295)
Ethon::Errors::InvalidValueinstead of silently becoming0. Strings andsymbols are accepted equivalently, and direct integer values remain
supported. (#300)
on_bodycallbacks are now consistently re-raised forboth Easy and Multi transfers, including when verbose mode is enabled.
Applications that relied on these exceptions being swallowed must handle
them explicitly. (#294)
curl_easy_setoptandcurl_multi_setoptare no longer ignored.An option the loaded libcurl does not know raises
Ethon::Errors::UnsupportedOption, and other rejected values raiseEthon::Errors::SetOption. Setting an option such asEasy#http_version = :httpv3on a libcurl built without HTTP/3 now raisesinstead of silently running with a different configuration.
Curl.supports_option?andCurl.version_at_least?can be used to guardoptional settings.
(#343)
require 'ethon'no longer loads mime-types: the registry is loaded on thefirst file upload instead, saving about 2.4 MB and 100 ms per process. Code
relying on ethon to load
MIME::Typesmust now require it itself.(Clément Joubert,
#320)
Easy#cleanupandMulti#cleanupare terminal, andEasy#performandEasy#resetraise while the handle is attached to aMulti. Applicationsthat reused cleaned-up or attached handles must create new ones.
(#326,
#339,
#346,
#382)
Behavior changes
Ethon.loggerat the debug levelinstead of directly to stdout, so request and response headers no longer
bypass the application's logging configuration. Set
Ethon.logger.level = Logger::DEBUGto keep seeing the messages; responsebody data is not logged.
(#390)
Easy, includingEasy.new(handle: ...)and
Easy#handle = nil, now installs Ethon's response callbacks and replaysthe callbacks retained by the object. Constructor options are applied to a
supplied handle instead of the handle Ethon created and discarded.
(#402)
Easy#postfields=now setsCURLOPT_POSTFIELDSIZEfrom the retained bytesand restores libcurl's default (
-1) when the body is cleared. This keeps aprevious, larger body size from being applied to a shorter body. Set
postfieldsizeafterpostfieldswhen sending a prefix or another length.(#403)
Easy#postfields=andEasy#copypostfields=now send binary bodies withouttruncating them at the first NUL. A
postfieldsizelarger than the retainedbody raises
Ethon::Errors::InvalidValueinstead of making libcurl readpast the buffer. Copying a new body without an explicit size sets the exact
byte length, and clearing the copied body clears the size as well.
(#436)
Multi.newnow acceptsmax_host_connections,max_pipeline_length,content_length_penalty_size, andchunk_length_penalty_size, which werealready in the multi option table but had no setters.
(#444)
Share#unlockfunctioncallbacks now receive(handle, data, userp), thearguments defined by
curl_unlock_function. They previously used the lockcallback signature, so the user pointer was read as an access mode and the
callback received a garbage fourth argument.
(#405)
Easy#headerandEasy#each_headernow default to the last request in atransfer (
request = -1), so structured headers describe the response aftera redirect instead of the first request. Pass
0to read the first request.(#409)
Easy#url=now stores a frozen snapshot of the string libcurl accepted, andEasy#request_headersreturns a fresh copy of the headers and header valuesthat were accepted. Mutating the object passed to a setter no longer makes
the accessor describe a URL or header set the handle never received.
(#413,
#418)
supports it, and fall back to the deprecated form API on older builds. Part
names, files, filenames, content types, and regular fields are preserved.
(#318)
writefunction,headerfunction, anddebugfunctionoptionspassed to
Easy.neware no longer overwritten by Ethon's internalcallbacks. A response that aborts from
on_headersalso leaves the bufferedbody empty.
(#345)
"Accept" => ""suppresses libcurl's default header, while
"X-Empty;" => ""sends an emptyheader. (gonubana,
#225)
Enhancements
CURLOPT_ERRORBUFFERsupport throughEasy#errorbuffer=andEasy#error_message, including reset, duplication, Multi, and Mirror support.(Adrien Rey-Jarthon,
#277)
Easy#file=andEasy#writedata=to stream response bodies to a pathor writable Ruby object without accumulating the body in memory. The original
implementation and authorship were preserved from PR #100.
(Seth Madison,
#298)
Easy#debugfunctionobservers while preserving Ethon'sinternal debug collection and safely propagating callback errors.
(Kai Lieth,
#154)
Easy#ssl_engines,Easy#cookielist, andEasy#certinfo. Slistresults are copied and freed according to libcurl ownership rules, while
certificate lists are copied without freeing libcurl-owned memory. The
relevant implementation and authorship were preserved from PR #74.
(Jethro Beekman,
#299)
curl_multi_performand native handle cleanup.(Vladimir Shteinman,
#278)
(Adrien Rey-Jarthon,
#276)
table entries, and symbolic option values, including DoH, HSTS, Alt-Svc,
AWS SigV4, SASL, HTTP/3, TLS 1.3 ciphers, proxy headers, and the modern
_t, socket, and pointer info getters.(#307,
#308,
#309)
Multinow preferscurl_multi_pollandcurl_multi_waitoverselect,allocating fd sets only for the fallback. This reduces
Multi.newmemoryfrom roughly 199 KB to 7 KB on hosts with a large fd limit and avoids 1ms
busy-waiting when no descriptor is ready.
(#330)
libcurl-4,libcurl-x64, andlibcurl-arm64.(Shizuo Fujita,
#271)
ETHON_CURL_LIBSto override the native libcurl library names.(Sergey Tarasov,
#235)
New libcurl bindings
Ethon::Curl::Url) withget,set,dup, andto_s, plus theCURLU_*part, code, and flag enums.(#311)
Ethon::Curl::Mime,Ethon::Curl::MimePart) andEasy#mime=/#mimepost=for multipart bodies, including per-part headers.(#312)
Ethon::Curl::Share) withEasy#share=andlock/unlock callbacks for multi-threaded sharing.
(#313)
Easy#header,Easy#each_header,Easy#headers_list), option introspection (Curl.easy_option,Curl.option_by_id,Curl.each_easy_option), and version introspection(
Curl.protocols,Curl.feature_names,Curl.version_info_full).(#314)
Easy#unescape,Easy#pause,Easy#upkeep,Multi#wait,Multi#poll, andMulti#wakeup.(#310)
Multi#assign,Multi#native_handles, theCurl::SslBackendenum,and optional
curl_global_sslset/curl_global_tracebindings.(#315)
Functions that are not exported by the loaded libcurl are attached
conditionally. Wrappers raise
NotImplementedErrorwhen the function they needis unavailable; introspection helpers return
nilor an empty array.Fixes and hardening
on_completecallbacks still run and anEasyis removed from itsMultibefore the error reaches the caller.
(#302)
curl_easy_initorcurl_multi_initnow raisesNoMemoryErrorimmediately instead of wrapping address
0and deferring the failure.(#305)
Easy#headers=now rejects CR and LF in header names and values withEthon::Errors::InvalidValue, so custom headers cannot inject additionalrequest headers.
(#327)
escape: falseinstead of always percent-encoding theform, matching POST behavior.
(#328)
native type before being passed to libcurl. Values outside the range raise
Ethon::Errors::InvalidValueinstead of a laterRangeErroror FFI error.(#329)
curl_slist_appendfails, and unknown header origins raiseEthon::Errors::InvalidValueinstead of reaching libcurl as0.(#347)
transfer wrote to. A completion callback can schedule the next transfer on
the same
Easy(including adding it to aMultiwith a new or reusedresponse file); that destination is no longer closed before the next transfer
runs.
Multi#addfinishes the previous transfer's stream before preparingthe next one, and no longer clears a pending callback error while the Easy is
completing, so the error from the finished transfer is still raised. A
failing close or flush also no longer replaces the callback or completion
error, and
Multi#performrunson_completebefore raising a teardown errorfor a handle libcurl already detached.
(#431)
Multi#assignrejects a nil or non-integer socket descriptor withEthon::Errors::InvalidValueinstead of letting FFI raiseTypeError.(#432)
Curl::Url#clonenow duplicates the native URL handle throughcurl_url_dup, like#dup, instead of raisingcannot duplicate FFI::AutoPointer.(#433)
nonblocking destinations could accept fewer bytes than a chunk without
raising, and the rest of the chunk was silently lost. A write that reports
zero progress now fails the transfer, while destinations returning
nilkeep their previous behavior.
(#443)
Easy#file=now opens a new path before releasing the previous responsedestination. A bad path raises without discarding the file that was already
configured, so the next
performstill writes to it.(#439)
Easykeeps a configured response file path and opens its ownstream for the next transfer. A caller-owned IO is still dropped so the two
handles cannot write into the same object.
(#435)
Arrayvalue as a file upload. Withparams_encoding: :none, ordinary arrays stay data, and file values aremarked by
Queryable::FileInfo. RawStringbodies are rejected whenmultipart: trueis requested instead of producing an unnamed part or aNoMethodError.(#441,
#438)
InvalidOption,UnsupportedOption, andSetOptionnow inspect the optionname in their messages, so control characters in an untrusted option key
cannot inject lines into logs.
(#442)
Easy#performandEasy#handlereturntypes, the
Multioption setter parameter types, andMulti#socket_action.(#445)
postfields, URL/MIME/slist/blob/share state, response, and return code,
because the new handle does not have them.
Easy#dupkeeps that statebecause the native duplicate already carries it.
(#448)
Ethon::Errors::InvalidValuenow escapes the value in its message, so aCR or LF in a rejected URL or request-line value can no longer be injected
into logs that record the exception.
(#429)
haproxy_client_ipoption now rejects whitespace. libcurl writes thevalue into the space-separated PROXY protocol line without validating it, so
a value could add fields or lines to the header.
(#428)
API wrote line breaks in paths and queries into the request line verbatim,
so a URL handle attached with
Easy#curlu=could inject headers. The stringsetter accepted the same input into
Easy#urland debug logs before thetransfer failed. Percent-encoded line breaks remain valid.
(#419,
#425)
Curl::Url.new(existing_url)now duplicates the handle instead of re-parsingits string form. Partial handles can be copied, complete handles are not
normalized, and non-zero
CURLU_*flags are rejected for a copy becausethere is no parse step to apply them to.
(#420)
Multi#addand#deletenow roll back their Ruby-side stack when the nativeadd or remove raises,
Easy#cleanuprefuses to free an attached handle, andMulti#cleanupdetaches every easy handle and is terminal. Socket and timercallbacks are kept until the native multi is cleaned up.
(#326)
Multi#deleteandMulti#cleanupnow clear the running count when the stackbecomes empty, so
Multi#ongoing?is false after the last handle is removed.A handle that libcurl detached before a socket callback raised is no longer
put back on the stack, so it remains usable.
(#421)
Easy#reset_transfer_stateclearsreturn_code, so adding a used Easy to aMulti no longer exposes the previous transfer's result until the new transfer
completes.
(#422)
on_complete, andcaller-owned response IOs are flushed when the transfer finishes. Previously
completion callbacks could read a partial body, and caller-owned file writers
needed an explicit flush after
perform.(#424)
Easy#log_inspectredacts credentials ineffective_urlso debug logs do notcontain URL passwords. The same redaction applies to
Mirror#log_informations;Easy#effective_urlandMirror#optionsstillreturn the exact URL.
(#423)
and null-byte cases they describe.
(#426)
writefunction,headerfunction, ordebugfunctionnow restoresEthon's internal callback. libcurl's default callback previously wrote
response bodies to stdout, stopped collecting response headers, or sent
verbose output to stderr.
(#410)
Easy#handle=now frees the native handle it replaces when this Easy ownedit, and reattaches the error buffer and
noprogresssetting to thereplacement. Replacing a handle no longer leaks it, and
#error_messageandprogress callbacks keep working.
(#411)
Multi#cleanupnow continues detaching the remaining easy handles after onenative detach or streamed-response close fails, instead of leaving them
attached to a cleaned-up Multi. The first error is still raised after
teardown.
(#412)
Curl::Mime.newnow rejects handles that are not anEthon::Easy, anEthon::Curl::EasyHandle, or a non-null raw easy pointer. Passing anotherowned handle, such as a
Multi, previously reachedcurl_mime_initandcould crash the process. Assigning
nilto a MIME part field now clears itinstead of setting an empty value or raising.
(#414)
Curl::Header#originnow masks every undocumented origin bit, not only thesingle reserved bit current libcurl sets, so the value only contains the
documented
CURLH_*bits.(#417)
Curl::Slist.buildnow rejects CR, LF, and NUL in list lines, so lists usedfor FTP quotes, SMTP recipients, and other verbatim protocol commands cannot
inject additional commands.
(#415)
:noneoptions no longer interpretfalseas enabled,Ethon.logger = nilfalls back to the default logger, and
ETHON_FD_SIZEis validated androunded up to the native fd_set word size.
(#366)
verbs that collide with
Ethon::Easy::Httpconstants such as:customor:actionableare sent as custom requests instead of raising.(#363)
selectfallback inMulti#set_fdsnow sleeps for the libcurl timeoutwhen no file descriptors are ready instead of busy-waiting in 1ms steps.
(#364)
Easy#file=treats writable path-like objects such asPathnameas pathsinstead of caller-owned IOs, so the response is no longer truncated on every
write. (#360)
verbatim to libcurl. Empty header lines are dropped, so assigning an empty
string clears the part headers instead of adding an empty header line.
(#362)
CURLOPT_COPYPOSTFIELDSvalues are now NUL-terminated, and assigningnilpasses a NULL pointer instead of a zero-length buffer.
(#359)
Easy#url=andEasy#postfields=only update the Ruby-side value afterlibcurl accepts the option, so a rejected value cannot leave the accessors
describing state the handle never received.
Easy#postfields=also retainsa frozen snapshot of the string libcurl points at, so caller mutations cannot
change the request or leave libcurl reading a reallocated buffer.
(#350,
#374)
Easy#cleanupdrops references to native-backed strings, lists, MIME/URLhandles, blobs, and callbacks after freeing the handle. It also drops the
response, progress, and debug callback closures, and
Multi#cleanupdropsits retained socket and timer callbacks, so terminal cleanup does not keep
application state alive.
(#365,
#381)
Multi#cleanupnow releases the native multi handle even when detaching aneasy handle or closing a streamed response fails, and keeps multi ownership
on an easy handle whose native detach failed so it cannot be reused.
(#352)
Multi#handleandMulti#cleanupnow enforce fork safety before allocatingor releasing a native multi handle, and
Easy#reset/#performvalidate thehandle before clearing response state, so a cleaned up or inherited handle
cannot truncate a response file or discard the previous result while raising.
(#358)
Easy#handle=now wraps a rawFFI::Pointerin an ownedEthon::Curl::EasyHandle, so the documented setter produces a usable handlethat fork safety tracks and
#cleanupfrees. Other owned pointer types andnull pointers are rejected.
(#380)
Easy#cleanupfrees the native handle even when closing a streamed responsefails, and
Multi#addcloses an open response stream when the easy handle isunusable or the native add fails.
(#358)
freeand raiseEthon::Errors::EthonErrorwhen used afterwards, instead of dereferencingthe freed native pointer. This covers Easy and Multi handles, URL, MIME,
share, and slist wrappers.
(#382)
Multi#assignreject freedowned pointers instead of handing libcurl a dangling address.
(#382,
#408)
curl_slist_appendallocation (FFI reports a NULL pointer, not
nil) and free the partiallybuilt list before installing it.
(#347,
#353)
:string_escape_nulloption type to resolveEthon::Easy::Utilinstead of an undefined constant.(#351)
against libcurl's own metadata, multipart round-trip tests, end-to-end
coverage for the
curl_multi_waitandselectfallbacks, and a multiresponse-isolation test.
(#354,
#355,
#356)
Easyno longer leaks the previous custom HTTP method or astale
CURLOPT_CURLUhandle.Easy#url=clears a URL handle,Easy#curlu=clears the string URL, and
Easy#resetdetaches the share before releasingit.
(#323,
#325,
#344)
to empty GET requests.
(#344)
it. (#368)
Curl::Share#shareand#unsharenow reject unknown or non-symbol/stringdata types with
Ethon::Errors::InvalidValue.(#338)
Easy#headerandEasy#each_headeraccept an array of header origins asdocumented, and reject unknown origins.
Ethon::Curl::Header#originnolonger exposes libcurl's reserved bit, so it matches the documented
CURLH_*values inEthon::Curl::HeaderOrigin.(#347,
#383)
Easy#cleanupis terminal; using the handle afterwards raisesEthon::Errors::EthonErrorinstead of silently sending requests withoutcallbacks. (#382)
re-raised after the transfer, matching the body and debug callbacks.
(#316)
Easy.supports_timeout_ms?now checks the libcurl version instead of asyncDNS support. (#319)
CURLOPT_HTTPPOSTon libcurl builds configured with--disable-form-api, where the option does not exist.(#349)
tcp_fastopen(CURLOPT_TCP_FASTOPEN,244) and the string ABI used by
tlsauth_typeandproxy_tlsauth_type.:srpand"srp"are normalized to libcurl's required"SRP"value.(#307)
Ethon::Errors::InvalidValueinstead of FFI'sArgumentError, andfractional or out-of-range values for integer options are rejected. Binary
bodies still use
copypostfields.(#329,
#340)
header, or a protocol command now reject CR and LF. This covers
customrequest,request_target,useragent,referer,cookie,accept_encoding,range, and the RTSP, SMTP, and FTP equivalents, whichcould otherwise inject additional headers or commands.
(#379)
CURLOPT_PROGRESSFUNCTION(double) andCURLOPT_XFERINFOFUNCTION(curl_off_t), and select it using libcurl'snumeric version instead of string comparison.
(#307)
escapeorparams_encodingafter a query string was built nowrebuilds the cached pairs and string.
(#332)
short-reading IO bodies, and correctly start from an IO's current position.
(#307,
#344)
Easynow rebinds its response, read, progress, and customcallbacks to the copy instead of leaving them pointing at the original
handle, starts with a clean result/callback-error state, and no longer
aliases the original MIME structure.
(#335)
resolve to those constants.
(#307,
#363)
Easy#resetnow clears multipart state, request headers, retained readcallbacks, and pending callback errors.
Easy#request_headersexposes therequest headers without colliding with the
on_headerscallback.(#307,
#323)
Easy#performandEasy#resetnow refuse to run while the handle is stillattached to a
Multi, matchingEasy#cleanup.(#339,
#346)
Easy#perform/#reset/#cleanup/#dupandMulti#perform/#socket_action/#cleanupnow reject reentrant calls made from callbackswhile the handle is still active.
(#342)
Easy#performnow returns the result of the transfer it ran even when anon_completecallback resets the Easy. Resetting clears#return_code, soperformused to returnnilafter a successful transfer.(#404)
#on_bodywithout a block, or after clearing the callback list, nolonger disables response body buffering.
(#334)
execution_mode, andno longer raises when
running_countis nil. Finalizers no longer emitThreadError/SignalExceptionwarnings.(#307)
fd_setnow uses pointer-sized socket entries.(#307)
CURLOPT_ECH,CURLOPT_TCP_KEEPCNT,CURLOPT_UPLOAD_FLAGS,CURLOPT_SSL_SIGNATURE_ALGORITHMS, and theCURLOPT_HTTPSIG_*family), the newerCURLINFO_*entries, andCURLUE_BACKSLASH/CURLU_GET_EMPTY/CURLU_NO_GUESS_SCHEME.(#341)
curl_global_sslsetresults now use theCurl::SslSetCodeenum. An unknownbackend is
:unknown_backendinstead of:unsupported_protocol, and a latecall is
:too_lateinstead of:failed_init.(#406)
~5s, and added coverage for the option table, callbacks, reset behavior,
Multi message handling, and libcurl info ownership.
(#324)
Easythat streams its response to a file from aMulti, or afailed
Multi#add, now closes the file instead of leaving it open until GC.(#336)
Multi#dupandMulti#clonenow raiseTypeErrorinstead of returning ashallow copy that shares the native multi handle and easy-handle stack with
the original.
(#372)
Easy#file=validates the easy handle before opening a path, so a cleaned upor fork-inherited handle cannot truncate the destination while raising.
(#373)
Easy#url=applies a string URL before detaching aCURLOPT_CURLUhandle,so a rejected value leaves the existing URL handle usable.
(#370)
Multi#addrejects an Easy that another Multi owns before resetting itstransfer state or preparing its response stream.
(#369)
other MIME part strings reject NUL bytes with
Ethon::Errors::InvalidValueinstead of FFI's
ArgumentError.(#371)
Easyretains managedCurl::Slistvalues assigned to list-backed optionssuch as
resolve,connect_to, andquote, so garbage collection cannotfree a list while libcurl still uses it.
(#368)
Curl::OwnedPointer.ownersreports every live handle and the memory usagetest really checks for native handle leaks. Registration and release are
synchronized for concurrent handles.
(#304,
#375)
Easy#resetcloses a streamed response file before clearing state, so aclose failure leaves the handle usable instead of half-reset.
(#376)
Easy#completerejects reentrant calls from its ownon_headersoron_completecallbacks instead of recursing until the stack overflows.(#377)
Multi#addno longer opens the response file, resets the transfer state, andclears callback errors before libcurl accepted the handle. A failed add
leaves the previous response and a streamed response file untouched, rolls
the native attach back when preparing the response stream fails or a socket
or timer callback raises, and keeps a handle it cannot detach tracked so
Multi#cleanupcan retry. Non-Ethon::Easyarguments raiseTypeError.(#386)
Easy#dupand#clonenow raiseEthon::Errors::EthonErrorwhen the Easyis still attached to a
Multi, matching#perform,#reset, and#cleanup. libcurl requires the source handle to be idle while it iscloned, and the copy can never be part of the same multi.
(#387)
Easy#share=,#mime=, and#curlu=now raiseTypeErrorfor values thatare not the matching
Ethon::Curlwrapper and keep the previously assignedhandle. Other
FFI::Pointervalues were passed to libcurl as a share, MIME,or URL handle, where the wrong native layout is undefined behavior.
(#388)
Curl::Url#setand#getreject unknown part names and flags withEthon::Errors::InvalidValueinstead of FFI'sArgumentError, and valuescontaining a NUL byte now raise
Ethon::Errors::InvalidValueinstead ofsilently truncating the URL passed to libcurl. Other values are coerced with
to_s, andnilstill clears a part.(#391)
Multi#easy_handlesreturns a frozen snapshot instead of the mutable arraythe multi uses for its bookkeeping. Modifying the returned array previously
desynchronized the Ruby-side stack from the handles libcurl had attached.
(#392)
Easy#resetis allowed from anon_completecallback again, restoringTyphoeus::Pool.release, and a callback error raised during the transfer isstill raised after the reset. Resets from body, header, and progress
callbacks stay rejected.
(#393)
validates its field name, filename, and content type, so they cannot inject
extra part headers on libcurl older than 7.81.
(#394)
Easy#mirroromits pointer-valued informations such asCURLINFO_TLS_SSL_PTR, so mirrored options stay marshalable for cachedresponses.
Easy#tls_ssl_ptrremains available.(#395)
selectfallback inMulti#set_fdsreleases the GVL while waiting, soother Ruby threads can run during the wait.
(#396)
:https3toproxytypeand:earlydatatossl_optionsandproxy_ssl_options.(#397)
Easykeeps the progress callback that was effective on theoriginal:
on_progressno longer disappears when a custom progress functionis also configured.
(#398)
Easy#handle=rejects assignment while the Easy is performing, completing,attached to a
Multi, or cleaned up.(#399)
Ethon::Curlwrapper already ownsnow raises instead of creating a second owner that can use the pointer after
it is freed.
Easy#handle=also rejects a handle owned by another Easy.(#401)
PID-aware pointers; removed unsafe Ruby finalizers and prevented inherited
native cleanup after forks. (#280,
#287,
#295)
libcurl may call or read them. (#282,
#284)
callbacks raise. (#285)
curl_version_infoenum ABI and Multi'sCURLMOPT_MAX_TOTAL_CONNECTIONSoption number.(#279,
#283)
getdtablesizeusage withEtc.sysconf, with a resourcelimit fallback and the existing
ETHON_FD_SIZEoverride.(#296)
(Felix Yan,
#275)
Documentation and maintenance
(#297,
#303)
README overview and usage sections, and fixed a stale documentation link and
parameter names.
(#317,
#451,
#453)
CURLMOPT_PIPELININGdocumentation to describe its integer bitmaskvalues. (Bernard Mak,
#239)
(Olle Jonsson,
#237)
(Vít Ondruch,
#256)
(#331,
#333)
memory use, GVL scheduling, GC and native handle leaks, encoding properties,
cleanup/MIME/reuse paths, and libcurl 8.23 differences.
(#306,
#321,
#322,
#337,
#348,
[#361](https://redirect.github.com/typhoeus/ethon/
Configuration
📅 Schedule: (UTC)
* 0-3 * * 1)🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.