diff options
| author | Brad King <brad.king@kitware.com> | 2017-10-04 07:28:34 -0400 |
|---|---|---|
| committer | Brad King <brad.king@kitware.com> | 2017-10-10 11:15:16 -0400 |
| commit | 9e3ef40edb6eae36e822c129bec5d4ee9de0dd57 (patch) | |
| tree | c739e929f90b5e6c4e26d4f5fea7f17d3772aefb /Utilities/cmcurl/lib/formdata.h | |
| parent | 2fad0e20b6b2b4c3cfc177267cf9689658f50c23 (diff) | |
| parent | de7c21d677db1ddaeece03c19e13e448f4031511 (diff) | |
| download | cmake-9e3ef40edb6eae36e822c129bec5d4ee9de0dd57.tar.gz | |
Merge branch 'upstream-curl' into update-curl
* upstream-curl:
curl 2017-10-04 (3ea76790)
Diffstat (limited to 'Utilities/cmcurl/lib/formdata.h')
| -rw-r--r-- | Utilities/cmcurl/lib/formdata.h | 54 |
1 files changed, 3 insertions, 51 deletions
diff --git a/Utilities/cmcurl/lib/formdata.h b/Utilities/cmcurl/lib/formdata.h index 69629f628c..1246c2bc8e 100644 --- a/Utilities/cmcurl/lib/formdata.h +++ b/Utilities/cmcurl/lib/formdata.h @@ -7,7 +7,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 @@ -22,32 +22,6 @@ * ***************************************************************************/ -enum formtype { - FORM_DATAMEM, /* already allocated FORM_DATA memory */ - FORM_DATA, /* form metadata (convert to network encoding if necessary) */ - FORM_CONTENT, /* form content (never convert) */ - FORM_CALLBACK, /* 'line' points to the custom pointer we pass to the callback - */ - FORM_FILE /* 'line' points to a file name we should read from - to create the form data (never convert) */ -}; - -/* plain and simple linked list with lines to send */ -struct FormData { - struct FormData *next; - enum formtype type; - char *line; - size_t length; -}; - -struct Form { - struct FormData *data; /* current form line to send */ - size_t sent; /* number of bytes of the current line that has - already been sent in a previous invoke */ - FILE *fp; /* file to read from */ - curl_read_callback fread_func; /* fread callback pointer */ -}; - /* used by FormAdd for temporary storage */ typedef struct FormInfo { char *name; @@ -69,31 +43,9 @@ typedef struct FormInfo { struct FormInfo *more; } FormInfo; -int Curl_FormInit(struct Form *form, struct FormData *formdata); - CURLcode Curl_getformdata(struct Curl_easy *data, - struct FormData **, + curl_mimepart *, struct curl_httppost *post, - const char *custom_contenttype, - curl_off_t *size); - -/* fread() emulation */ -size_t Curl_FormReader(char *buffer, - size_t size, - size_t nitems, - FILE *mydata); - -/* - * Curl_formpostheader() returns the first line of the formpost, the - * request-header part (which is not part of the request-body like the rest of - * the post). - */ -char *Curl_formpostheader(void *formp, size_t *len); - -char *Curl_FormBoundary(void); - -void Curl_formclean(struct FormData **); - -CURLcode Curl_formconvert(struct Curl_easy *, struct FormData *); + curl_read_callback fread_func); #endif /* HEADER_CURL_FORMDATA_H */ |
