> An option like CURLOPT_IPRESOLVE seems like a much cleaner solution. Not necessarily. If we have a bunch of applications on the system with large codebases which use CURLOPT_IPRESOLVE = AUTO in too many places, then all these places should detect somehow that "IPv6 doesn't work" and change the resolve mode to IPv4. It is just not always feasible or desirable.
The "curl_global_init_ipv6() with callback" solves this problem very easily and cleanly - as just one global callback can instantly tell all multi handles created in the application that "IPv6 doesn't work" and let them all fall back to IPv4. Thanks, Dmitry -----Original Message----- From: curl-library <[email protected]> On Behalf Of Dan Fandrich via curl-library Sent: Tuesday, September 20, 2022 12:14 PM To: [email protected] Cc: Dan Fandrich <[email protected]> Subject: [EXTERNAL] Re: Feature request: provide ability to set a global callback function telling libcurl if IPv6 works on the system On Tue, Sep 20, 2022 at 06:58:31PM +0000, Dmitry Karpov via curl-library wrote: > To cover such a range of cases, curl application needs a more flexible > approach for detection whether IPv6 works on the "system level". > And I guess the "curl_global_init_ipv6() with callback" provides such > flexibility and allows to satisfy a wide range of application-specific needs. Without discussing of the merits of such an idea, a callback function doesn't seem like the right way to configure this in libcurl. An option like CURLOPT_IPRESOLVE seems like a much cleaner solution. Dan -- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html -- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html
