mirror of
https://github.com/curl/curl.git
synced 2026-08-26 07:03:33 +03:00
duphandle: use strdup to clone *COPYPOSTFIELDS if size is not set
Previously it would unconditionally use the size, which is set to -1 when strlen is requested. Updated test 544 to verify. Closes #12317
This commit is contained in:
parent
addabb1794
commit
baf7b803b3
2 changed files with 7 additions and 6 deletions
|
|
@ -63,7 +63,6 @@ int test(char *URL)
|
|||
/* Update the original data to detect non-copy. */
|
||||
strcpy(teststring, "FAIL");
|
||||
|
||||
#ifdef LIB545
|
||||
{
|
||||
CURL *handle2;
|
||||
handle2 = curl_easy_duphandle(curl);
|
||||
|
|
@ -71,7 +70,6 @@ int test(char *URL)
|
|||
|
||||
curl = handle2;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Now, this is a POST request with binary 0 embedded in POST data. */
|
||||
res = curl_easy_perform(curl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue