mirror of
https://github.com/curl/curl.git
synced 2026-07-23 00:47:18 +03:00
tool_getparam: make --doh-url "" switch it off
A possible future addition could be to parse the URL first too to verify that it is valid before trying to use it. Assisted-by: Jay Satiro Closes #9207
This commit is contained in:
parent
0c47d879ae
commit
f7e14fee68
2 changed files with 6 additions and 0 deletions
|
|
@ -16,4 +16,7 @@ name lookups take place over SSL. However, the certificate verification
|
|||
settings are not inherited and can be controlled separately via
|
||||
--doh-insecure and --doh-cert-status.
|
||||
|
||||
This option is unset if an empty string "" is used as the URL. (Added in
|
||||
7.85.0)
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
|
|
|
|||
|
|
@ -701,6 +701,9 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
|||
break;
|
||||
case 'C': /* doh-url */
|
||||
GetStr(&config->doh_url, nextarg);
|
||||
if(config->doh_url && !config->doh_url[0])
|
||||
/* if given a blank string, we make it NULL again */
|
||||
Curl_safefree(config->doh_url);
|
||||
break;
|
||||
case 'd': /* ciphers */
|
||||
GetStr(&config->cipher_list, nextarg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue