diff options
author | dartraiden <wowemuh@gmail.com> | 2023-09-16 22:53:10 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2023-09-16 22:53:10 +0300 |
commit | 47346b568cae68439c3d39f06f8c4ab14911475d (patch) | |
tree | 617c91959e8c606a315a1aaaf13a38f5b7333e9a /libs/libcurl/src/setopt.c | |
parent | cb1787afbb67184321f206f13f836b63cd06740a (diff) |
libcurl: update to 8.3.0
Diffstat (limited to 'libs/libcurl/src/setopt.c')
-rw-r--r-- | libs/libcurl/src/setopt.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libs/libcurl/src/setopt.c b/libs/libcurl/src/setopt.c index 029fb341ac..a91c8d3589 100644 --- a/libs/libcurl/src/setopt.c +++ b/libs/libcurl/src/setopt.c @@ -666,17 +666,20 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) data->set.method = HTTPREQ_GET;
break;
-#ifndef CURL_DISABLE_MIME
+#ifndef CURL_DISABLE_FORM_API
case CURLOPT_HTTPPOST:
/*
- * Set to make us do HTTP POST
+ * Set to make us do HTTP POST. Legacy API-style.
*/
data->set.httppost = va_arg(param, struct curl_httppost *);
data->set.method = HTTPREQ_POST_FORM;
data->set.opt_no_body = FALSE; /* this is implied */
+ Curl_mime_cleanpart(data->state.formp);
+ Curl_safefree(data->state.formp);
break;
#endif
+#if !defined(CURL_DISABLE_AWS)
case CURLOPT_AWS_SIGV4:
/*
* String that is merged to some authentication
@@ -690,6 +693,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) if(data->set.str[STRING_AWS_SIGV4])
data->set.httpauth = CURLAUTH_AWS_SIGV4;
break;
+#endif
case CURLOPT_REFERER:
/*
@@ -985,6 +989,10 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) if(!result) {
data->set.method = HTTPREQ_POST_MIME;
data->set.opt_no_body = FALSE; /* this is implied */
+#ifndef CURL_DISABLE_FORM_API
+ Curl_mime_cleanpart(data->state.formp);
+ Curl_safefree(data->state.formp);
+#endif
}
break;
@@ -1237,6 +1245,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) data->set.out = va_arg(param, void *);
break;
+#ifdef CURL_LIST_ONLY_PROTOCOL
case CURLOPT_DIRLISTONLY:
/*
* An option that changes the command to one that asks for a list only, no
@@ -1244,7 +1253,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) */
data->set.list_only = (0 != va_arg(param, long)) ? TRUE : FALSE;
break;
-
+#endif
case CURLOPT_APPEND:
/*
* We want to upload and append to an existing file. Used for FTP and
@@ -1885,6 +1894,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) result = Curl_setstropt(&data->set.str[STRING_DEVICE],
va_arg(param, char *));
break;
+#ifndef CURL_DISABLE_BINDLOCAL
case CURLOPT_LOCALPORT:
/*
* Set what local port to bind the socket to when performing an operation.
@@ -1903,6 +1913,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) return CURLE_BAD_FUNCTION_ARGUMENT;
data->set.localportrange = curlx_sltous(arg);
break;
+#endif
case CURLOPT_GSSAPI_DELEGATION:
/*
* GSS-API credential delegation bitmask
|