#include "curl_setup.h"
#include <curl/curl.h>
#include "urldata.h"
#include "formdata.h"
#include "vtls/vtls.h"
#include "strcase.h"
#include "sendf.h"
#include "strdup.h"
#include "rand.h"
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
Go to the source code of this file.
Defines | |
#define | basename(x) Curl_basename((x)) |
#define | filesize(name, stat_data) (stat_data.st_size) |
#define | fopen_read fopen |
#define | FORM_FILE_SEPARATOR ',' |
#define | FORM_TYPE_SEPARATOR ';' |
#define | HTTPPOST_BUFFER CURL_HTTPPOST_BUFFER |
#define | HTTPPOST_CALLBACK CURL_HTTPPOST_CALLBACK |
#define | HTTPPOST_CONTENTTYPE_DEFAULT "application/octet-stream" |
#define | HTTPPOST_FILENAME CURL_HTTPPOST_FILENAME |
#define | HTTPPOST_PTRBUFFER CURL_HTTPPOST_PTRBUFFER |
#define | HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS |
#define | HTTPPOST_PTRNAME CURL_HTTPPOST_PTRNAME |
#define | HTTPPOST_READFILE CURL_HTTPPOST_READFILE |
Functions | |
static CURLcode | AddFormData (struct FormData **formp, enum formtype type, const void *line, curl_off_t length, curl_off_t *size) |
static CURLcode | AddFormDataf (struct FormData **formp, curl_off_t *size, const char *fmt,...) |
static FormInfo * | AddFormInfo (char *value, char *contenttype, FormInfo *parent_form_info) |
static struct curl_httppost * | AddHttpPost (char *name, size_t namelength, char *value, curl_off_t contentslength, char *buffer, size_t bufferlength, char *contenttype, long flags, struct curl_slist *contentHeader, char *showfilename, char *userp, struct curl_httppost *parent_post, struct curl_httppost **httppost, struct curl_httppost **last_post) |
static const char * | ContentTypeForFilename (const char *filename, const char *prevtype) |
static char * | Curl_basename (char *path) |
CURLFORMcode | curl_formadd (struct curl_httppost **httppost, struct curl_httppost **last_post,...) |
void | Curl_formclean (struct FormData **form_ptr) |
void | curl_formfree (struct curl_httppost *form) |
int | curl_formget (struct curl_httppost *form, void *arg, curl_formget_callback append) |
int | Curl_FormInit (struct Form *form, struct FormData *formdata) |
char * | Curl_formpostheader (void *formp, size_t *len) |
size_t | Curl_FormReader (char *buffer, size_t size, size_t nitems, FILE *mydata) |
CURLcode | Curl_getformdata (struct Curl_easy *data, struct FormData **finalform, struct curl_httppost *post, const char *custom_content_type, curl_off_t *sizep) |
static CURLFORMcode | FormAdd (struct curl_httppost **httppost, struct curl_httppost **last_post, va_list params) |
static char * | formboundary (struct Curl_easy *data) |
static CURLcode | formdata_add_filename (const struct curl_httppost *file, struct FormData **form, curl_off_t *size) |
static size_t | readfromfile (struct Form *form, char *buffer, size_t size) |
static char * | strippath (const char *fullfile) |
#define basename | ( | x | ) | Curl_basename((x)) |
Definition at line 47 of file formdata.c.
Definition at line 811 of file formdata.c.
#define fopen_read fopen |
Definition at line 1419 of file formdata.c.
#define FORM_FILE_SEPARATOR ',' |
Definition at line 57 of file formdata.c.
#define FORM_TYPE_SEPARATOR ';' |
Definition at line 58 of file formdata.c.
#define HTTPPOST_BUFFER CURL_HTTPPOST_BUFFER |
Definition at line 66 of file formdata.c.
Definition at line 65 of file formdata.c.
#define HTTPPOST_CONTENTTYPE_DEFAULT "application/octet-stream" |
Definition at line 55 of file formdata.c.
Definition at line 61 of file formdata.c.
Definition at line 64 of file formdata.c.
Definition at line 62 of file formdata.c.
Definition at line 60 of file formdata.c.
Definition at line 63 of file formdata.c.
static CURLcode AddFormData | ( | struct FormData ** | formp, |
enum formtype | type, | ||
const void * | line, | ||
curl_off_t | length, | ||
curl_off_t * | size | ||
) | [static] |
Definition at line 822 of file formdata.c.
static CURLcode AddFormDataf | ( | struct FormData ** | formp, |
curl_off_t * | size, | ||
const char * | fmt, | ||
... | |||
) | [static] |
Definition at line 914 of file formdata.c.
static FormInfo* AddFormInfo | ( | char * | value, |
char * | contenttype, | ||
FormInfo * | parent_form_info | ||
) | [static] |
Definition at line 137 of file formdata.c.
static struct curl_httppost* AddHttpPost | ( | char * | name, |
size_t | namelength, | ||
char * | value, | ||
curl_off_t | contentslength, | ||
char * | buffer, | ||
size_t | bufferlength, | ||
char * | contenttype, | ||
long | flags, | ||
struct curl_slist * | contentHeader, | ||
char * | showfilename, | ||
char * | userp, | ||
struct curl_httppost * | parent_post, | ||
struct curl_httppost ** | httppost, | ||
struct curl_httppost ** | last_post | ||
) | [static, read] |
Definition at line 79 of file formdata.c.
static const char* ContentTypeForFilename | ( | const char * | filename, |
const char * | prevtype | ||
) | [static] |
Definition at line 174 of file formdata.c.
static char * Curl_basename | ( | char * | path | ) | [static] |
Definition at line 1063 of file formdata.c.
CURLFORMcode curl_formadd | ( | struct curl_httppost ** | httppost, |
struct curl_httppost ** | last_post, | ||
... | |||
) |
Definition at line 741 of file formdata.c.
void Curl_formclean | ( | struct FormData ** | form_ptr | ) |
Definition at line 939 of file formdata.c.
void curl_formfree | ( | struct curl_httppost * | form | ) |
Definition at line 1011 of file formdata.c.
int curl_formget | ( | struct curl_httppost * | form, |
void * | arg, | ||
curl_formget_callback | append | ||
) |
Definition at line 965 of file formdata.c.
int Curl_FormInit | ( | struct Form * | form, |
struct FormData * | formdata | ||
) |
Definition at line 1405 of file formdata.c.
char* Curl_formpostheader | ( | void * | formp, |
size_t * | len | ||
) |
Definition at line 1550 of file formdata.c.
size_t Curl_FormReader | ( | char * | buffer, |
size_t | size, | ||
size_t | nitems, | ||
FILE * | mydata | ||
) |
Definition at line 1493 of file formdata.c.
CURLcode Curl_getformdata | ( | struct Curl_easy * | data, |
struct FormData ** | finalform, | ||
struct curl_httppost * | post, | ||
const char * | custom_content_type, | ||
curl_off_t * | sizep | ||
) |
Definition at line 1156 of file formdata.c.
static CURLFORMcode FormAdd | ( | struct curl_httppost ** | httppost, |
struct curl_httppost ** | last_post, | ||
va_list | params | ||
) | [static] |
Definition at line 268 of file formdata.c.
static char * formboundary | ( | struct Curl_easy * | data | ) | [static] |
Definition at line 1570 of file formdata.c.
static CURLcode formdata_add_filename | ( | const struct curl_httppost * | file, |
struct FormData ** | form, | ||
curl_off_t * | size | ||
) | [static] |
Definition at line 1100 of file formdata.c.
static size_t readfromfile | ( | struct Form * | form, |
char * | buffer, | ||
size_t | size | ||
) | [static] |
Definition at line 1456 of file formdata.c.
static char* strippath | ( | const char * | fullfile | ) | [static] |
Definition at line 1085 of file formdata.c.