tool_getparam: build post data using dynbuf (more)

This commit is contained in:
Daniel Stenberg 2024-01-08 17:00:05 +01:00
parent 1dba44b2f1
commit 1f4433dad4
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 26 additions and 55 deletions

View file

@ -660,7 +660,7 @@ CURLcode tool_setopt(CURL *curl, bool str, struct GlobalConfig *global,
if(escape) {
curl_off_t len = ZERO_TERMINATED;
if(tag == CURLOPT_POSTFIELDS)
len = config->postfieldsize;
len = curlx_dyn_len(&config->postdata);
escaped = c_escape(value, len);
NULL_CHECK(escaped);
CODE2("curl_easy_setopt(hnd, %s, \"%s\");", name, escaped);