]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib544.c: use duphandle for test 545
authorDaniel Stenberg <daniel@haxx.se>
Thu, 16 Oct 2014 21:58:59 +0000 (23:58 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 5 Nov 2014 07:05:14 +0000 (08:05 +0100)
To verify that curl_easy_duphandle() works fine on a handle that has
gotten data stored with *_COPYPOSTFIELDS.

tests/libtest/lib544.c

index 4a4e4f223a4d25b691f29fc8081561548e45c9e6..7e2f73518e89c902beb15263c971ec0778834487 100644 (file)
@@ -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);