mirror of
https://github.com/curl/curl.git
synced 2026-08-26 01:33:33 +03:00
curl: error out when options need features not present in libcurl
Trying to use a proxy when libcurl was built with proxy support disabled should make curl error out properly. Remove knowledge of disabled features from the tool code and instead make it properly respond to what libcurl returns. Update all tests to properly require the necessary features to be present/absent so that the test suite can still be run even with libcurl builds with disabled features. Ref: https://curl.se/mail/archive-2022-03/0013.html Closes #8565
This commit is contained in:
parent
96edc7954f
commit
95e8515ca0
23 changed files with 105 additions and 170 deletions
|
|
@ -7,7 +7,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
|
@ -29,17 +29,10 @@
|
|||
* Macros used in operate()
|
||||
*/
|
||||
|
||||
#define SETOPT_CHECK(v,opt) do { \
|
||||
if(!tool_setopt_skip(opt)) { \
|
||||
result = (v); \
|
||||
if(result) \
|
||||
break; \
|
||||
} \
|
||||
#define SETOPT_CHECK(v,opt) do { \
|
||||
result = (v); \
|
||||
} while(0)
|
||||
|
||||
/* allow removed features to simulate success: */
|
||||
bool tool_setopt_skip(CURLoption tag);
|
||||
|
||||
#ifndef CURL_DISABLE_LIBCURL_OPTION
|
||||
|
||||
/* Associate symbolic names with option values */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue