mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:03:31 +03:00
moved here from the newlib branch
This commit is contained in:
parent
fb9d1ff00f
commit
96dde76b99
54 changed files with 2824 additions and 2580 deletions
|
|
@ -60,6 +60,8 @@
|
|||
#include <curl/curl.h>
|
||||
#include "formdata.h"
|
||||
|
||||
#include "strequal.h"
|
||||
|
||||
/* Length of the random boundary string. The risk of this being used
|
||||
in binary data is very close to zero, 64^32 makes
|
||||
6277101735386680763835789423207666416102355444464034512896
|
||||
|
|
@ -377,7 +379,7 @@ void FormFree(struct FormData *form)
|
|||
free(form->line); /* free the line */
|
||||
free(form); /* free the struct */
|
||||
|
||||
} while(form=next); /* continue */
|
||||
} while((form=next)); /* continue */
|
||||
}
|
||||
|
||||
struct FormData *getFormData(struct HttpPost *post,
|
||||
|
|
@ -513,11 +515,16 @@ struct FormData *getFormData(struct HttpPost *post,
|
|||
|
||||
int FormInit(struct Form *form, struct FormData *formdata )
|
||||
{
|
||||
form->data = formdata;
|
||||
form->sent = 0;
|
||||
|
||||
if(!formdata)
|
||||
return 1; /* error */
|
||||
|
||||
/* First, make sure that we'll send a nice terminating sequence at the end
|
||||
* of the post. We *DONT* add this string to the size of the data since this
|
||||
* is actually AFTER the data. */
|
||||
AddFormDataf(&formdata, "\r\n\r\n");
|
||||
|
||||
form->data = formdata;
|
||||
form->sent = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue