From: Daniel Stenberg Date: Thu, 16 Oct 2014 21:58:59 +0000 (+0200) Subject: lib544.c: use duphandle for test 545 X-Git-Tag: curl-7_39_0~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d997c8b2f6521d78c6ef63411cfeb226f7927281;p=thirdparty%2Fcurl.git lib544.c: use duphandle for test 545 To verify that curl_easy_duphandle() works fine on a handle that has gotten data stored with *_COPYPOSTFIELDS. --- diff --git a/tests/libtest/lib544.c b/tests/libtest/lib544.c index 4a4e4f223a..7e2f73518e 100644 --- a/tests/libtest/lib544.c +++ b/tests/libtest/lib544.c @@ -68,6 +68,16 @@ int test(char *URL) /* Update the original data to detect non-copy. */ strcpy(teststring, "FAIL"); +#ifdef LIB545 + { + CURL *handle2; + handle2 = curl_easy_duphandle(curl); + curl_easy_cleanup(curl); + + curl = handle2; + } +#endif + /* Now, this is a POST request with binary 0 embedded in POST data. */ res = curl_easy_perform(curl);