tool: fix --capath when proxy support is disabled#12089
Conversation
|
We try hard to not move |
|
So something like ? else if(result == CURLE_UNKNOWN_OPTION && !config->proxy_capath) {
/* If proxy support is disabled, and we only have --capath, ignore the error */
}I wonder |
|
I was thinking like the patch below. The *setopt() code returns So I think the safest and most sane approach is to check for both and treat them the same: diff --git a/src/tool_operate.c b/src/tool_operate.c
index b60f57e0d..697b64e38 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1774,11 +1774,12 @@ static CURLcode single_transfer(struct GlobalConfig *global,
if(config->proxy_capath || config->capath) {
result = res_setopt_str(curl, CURLOPT_PROXY_CAPATH,
(config->proxy_capath ?
config->proxy_capath :
config->capath));
- if(result == CURLE_NOT_BUILT_IN) {
+ if((result == CURLE_NOT_BUILT_IN) ||
+ (result == CURLE_UNKNOWN_OPTION)) {
if(config->proxy_capath) {
warnf(global,
"ignoring --proxy-capath, not supported by libcurl");
}
} |
After 95e8515, --capath always sets CURLOPT_PROXY_CAPATH, which fails with CURLE_UNKNOWN_OPTION when proxy support is disabled.
|
OK, this mean that using |
2b6b958 to
fef672d
Compare
|
Thanks! |
After 95e8515, --capath always sets CURLOPT_PROXY_CAPATH, which fails with CURLE_UNKNOWN_OPTION when proxy support is disabled.