formdata: provide error message
When failing to build form post due to an error, the code now does a proper failf(). Previously libcurl would report an error like "failed creating formpost data" when a file wasn't possible to open which was not easy for users to figure out. I also lower cased a function name to be named more curl-style and removed some unnecessary code.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2010, 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
|
||||
@@ -70,11 +70,11 @@ typedef struct FormInfo {
|
||||
|
||||
int Curl_FormInit(struct Form *form, struct FormData *formdata );
|
||||
|
||||
CURLcode
|
||||
Curl_getFormData(struct FormData **,
|
||||
struct curl_httppost *post,
|
||||
const char *custom_contenttype,
|
||||
curl_off_t *size);
|
||||
CURLcode Curl_getformdata(struct SessionHandle *data,
|
||||
struct FormData **,
|
||||
struct curl_httppost *post,
|
||||
const char *custom_contenttype,
|
||||
curl_off_t *size);
|
||||
|
||||
/* fread() emulation */
|
||||
size_t Curl_FormReader(char *buffer,
|
||||
|
Reference in New Issue
Block a user