setopt: let CURLOPT_ECH set to NULL reset to default

Because NULL is documented as default and most options that take
pointers accept NULL to reset back to internal default.

Closes #14634
This commit is contained in:
Daniel Stenberg 2024-08-22 13:17:27 +02:00
parent 20d447c1a7
commit 05609bac95
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -3188,8 +3188,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
argptr = va_arg(param, char *); argptr = va_arg(param, char *);
if(!argptr) { if(!argptr) {
data->set.tls_ech = CURLECH_DISABLE; data->set.tls_ech = CURLECH_DISABLE;
result = CURLE_BAD_FUNCTION_ARGUMENT; return CURLE_OK;
return result;
} }
plen = strlen(argptr); plen = strlen(argptr);
if(plen > CURL_MAX_INPUT_LENGTH) { if(plen > CURL_MAX_INPUT_LENGTH) {