diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-12-22 17:08:38 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-12-22 23:07:46 +0100 |
commit | f4883ba9663a8f74c6b3acd93bba107adfd15340 (patch) | |
tree | b6193100559aeb95a6f082328ea73f390def7f28 /lib/setopt.c | |
parent | aef4dc892d012d990c85c7bad0d9d06c2ebfa775 (diff) | |
download | curl-f4883ba9663a8f74c6b3acd93bba107adfd15340.tar.gz |
urldata: make set.http200aliases conditional on HTTP being present
And make a few SSH-only fields depend on SSH
Closes #10140
Diffstat (limited to 'lib/setopt.c')
-rw-r--r-- | lib/setopt.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/setopt.c b/lib/setopt.c index 691ce395a..48a5421b1 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -732,13 +732,6 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) data->set.sep_headers = (bool)((arg & CURLHEADER_SEPARATE)? TRUE: FALSE); break; - case CURLOPT_HTTP200ALIASES: - /* - * Set a list of aliases for HTTP 200 in response header - */ - data->set.http200aliases = va_arg(param, struct curl_slist *); - break; - #if !defined(CURL_DISABLE_COOKIES) case CURLOPT_COOKIE: /* @@ -944,6 +937,13 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) data->set.http09_allowed = arg ? TRUE : FALSE; #endif break; + + case CURLOPT_HTTP200ALIASES: + /* + * Set a list of aliases for HTTP 200 in response header + */ + data->set.http200aliases = va_arg(param, struct curl_slist *); + break; #endif /* CURL_DISABLE_HTTP */ #if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_SMTP) || \ @@ -2546,6 +2546,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) data->set.ssh_hostkeyfunc_userp = va_arg(param, void *); break; #endif + case CURLOPT_SSH_KEYFUNCTION: /* setting to NULL is fine since the ssh.c functions themselves will then revert to use the internal default */ @@ -2592,7 +2593,8 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) return CURLE_BAD_FUNCTION_ARGUMENT; data->set.new_file_perms = (unsigned int)arg; break; - +#endif +#ifdef USE_SSH case CURLOPT_NEW_DIRECTORY_PERMS: /* * Uses these permissions instead of 0755 |