Imported Upstream version 7.59.0
[platform/upstream/curl.git] / tests / libtest / lib554.c
index 0837462..cc21d24 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -67,11 +67,11 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
 static int once(char *URL, bool oldstyle)
 {
   CURL *curl;
-  CURLcode res=CURLE_OK;
+  CURLcode res = CURLE_OK;
   CURLFORMcode formrc;
 
-  struct curl_httppost *formpost=NULL;
-  struct curl_httppost *lastptr=NULL;
+  struct curl_httppost *formpost = NULL;
+  struct curl_httppost *lastptr = NULL;
   struct WriteThis pooh;
   struct WriteThis pooh2;
 
@@ -117,7 +117,7 @@ static int once(char *URL, bool oldstyle)
                         CURLFORM_END);
 
   if(formrc)
-    printf("curl_formadd(1) = %d\n", (int)formrc);
+    printf("curl_formadd(2) = %d\n", (int)formrc);
 
   /* Fill in the filename field */
   formrc = curl_formadd(&formpost,
@@ -134,7 +134,7 @@ static int once(char *URL, bool oldstyle)
                         CURLFORM_END);
 
   if(formrc)
-    printf("curl_formadd(2) = %d\n", (int)formrc);
+    printf("curl_formadd(3) = %d\n", (int)formrc);
 
   /* Fill in a submit field too */
   formrc = curl_formadd(&formpost,
@@ -147,10 +147,11 @@ static int once(char *URL, bool oldstyle)
 #else
                         CURLFORM_COPYCONTENTS, "send",
 #endif
+                        CURLFORM_CONTENTTYPE, "text/plain",
                         CURLFORM_END);
 
   if(formrc)
-    printf("curl_formadd(3) = %d\n", (int)formrc);
+    printf("curl_formadd(4) = %d\n", (int)formrc);
 
   formrc = curl_formadd(&formpost, &lastptr,
                         CURLFORM_COPYNAME, "somename",
@@ -160,7 +161,7 @@ static int once(char *URL, bool oldstyle)
                         CURLFORM_END);
 
   if(formrc)
-    printf("curl_formadd(4) = %d\n", (int)formrc);
+    printf("curl_formadd(5) = %d\n", (int)formrc);
 
   curl = curl_easy_init();
   if(!curl) {