Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: '--socks5-hostname' and 'CURL_DISABLE_PROXY'
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se>
Date: Wed, 9 Mar 2022 09:32:56 +0100 (CET)
On Tue, 8 Mar 2022, Timothe Litt via curl-users wrote:
>> +#if defined(CURL_DISABLE_PROXY)
> I think it probably belongs in the library - not just the command line
> "tool". E.g. setting the corresponding CURLOPTs should fail with a "not
> implemented" error;
libcurl already does.
> the tool can check for that error under "#ifdef CURL_DISABLE_PROXY" and
> produce your helpful message. This will produce hard errors for other users
> of the cURL library, which are many.
It's slightly more complicated.
In general the tool code should not check for things present or not in the
library using build-time systems, since the library can be replaced at
run-time without the tool being so.
But there's more to it. I took some shortcuts a while ago when I added a few
CI builds that build and run the test suite with disabled features, so I made
the tool know about those features and avoid trying to set those options when
the specific feature is disabled. This made it easier to verify that libcurl
works correctly with disabled features, but it makes it slightly more
complicated to make the tool error out when said features are used.
Date: Wed, 9 Mar 2022 09:32:56 +0100 (CET)
On Tue, 8 Mar 2022, Timothe Litt via curl-users wrote:
>> +#if defined(CURL_DISABLE_PROXY)
> I think it probably belongs in the library - not just the command line
> "tool". E.g. setting the corresponding CURLOPTs should fail with a "not
> implemented" error;
libcurl already does.
> the tool can check for that error under "#ifdef CURL_DISABLE_PROXY" and
> produce your helpful message. This will produce hard errors for other users
> of the cURL library, which are many.
It's slightly more complicated.
In general the tool code should not check for things present or not in the
library using build-time systems, since the library can be replaced at
run-time without the tool being so.
But there's more to it. I took some shortcuts a while ago when I added a few
CI builds that build and run the test suite with disabled features, so I made
the tool know about those features and avoid trying to set those options when
the specific feature is disabled. This made it easier to verify that libcurl
works correctly with disabled features, but it makes it slightly more
complicated to make the tool error out when said features are used.
-- / daniel.haxx.se | Commercial curl support up to 24x7 is available! | Private help, bug fixes, support, ports, new features | https://curl.se/support.html
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-users Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2022-03-09