diff options
Diffstat (limited to 'docs/examples/postit2.c')
-rw-r--r-- | docs/examples/postit2.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/examples/postit2.c b/docs/examples/postit2.c index 88ea78c8..67e685f1 100644 --- a/docs/examples/postit2.c +++ b/docs/examples/postit2.c @@ -5,11 +5,11 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2016, 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 - * are also available at http://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* <DESC> + * HTTP Multipart formpost with file upload and two additional parts. + * </DESC> + */ /* Example code that uploads a file name 'foo' to a remote script that accepts * "HTML form based" (as described in RFC1738) uploads using HTTP POST. * @@ -79,7 +83,7 @@ int main(int argc, char *argv[]) if(curl) { /* what URL that receives this POST */ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/examplepost.cgi"); - if ( (argc == 2) && (!strcmp(argv[1], "noexpectheader")) ) + if((argc == 2) && (!strcmp(argv[1], "noexpectheader"))) /* only disable 100-continue header if explicitly requested */ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist); curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); |