aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-08-08 10:21:03 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-08-08 18:45:03 +0200
commit45d883d88df76af778ce7024912d3fdd08d13859 (patch)
treedef58058c522f91a0d8c6f97a66eae0cf4aa3430 /tests/libtest
parent3ef6418b611298ec748fe245eb082b8f33318aba (diff)
CURLFORM_BUFFER: insert filename as documented
A regression where CURLFORM_BUFFER stopped to properly insert the file name part in the formpart. Bug introduced in commit f851f768578dc096. Added CURLFORM_BUFFER use to test 554 to verify this. Bug: http://curl.haxx.se/mail/lib-2011-07/0176.html Reported by: Henry Ludemann
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/lib554.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/libtest/lib554.c b/tests/libtest/lib554.c
index ed8d13f05..8e71c8899 100644
--- a/tests/libtest/lib554.c
+++ b/tests/libtest/lib554.c
@@ -136,6 +136,16 @@ int test(char *URL)
if(formrc)
printf("curl_formadd(3) = %d\n", (int)formrc);
+ formrc = curl_formadd(&formpost, &lastptr,
+ CURLFORM_COPYNAME, "somename",
+ CURLFORM_BUFFER, "somefile.txt",
+ CURLFORM_BUFFERPTR, "blah blah",
+ CURLFORM_BUFFERLENGTH, 9,
+ CURLFORM_END);
+
+ if(formrc)
+ printf("curl_formadd(4) = %d\n", (int)formrc);
+
if ((curl = curl_easy_init()) == NULL) {
fprintf(stderr, "curl_easy_init() failed\n");
curl_formfree(formpost);