diff options
Diffstat (limited to 'src/3rdParty/http_tiny/http_lib.c')
-rw-r--r-- | src/3rdParty/http_tiny/http_lib.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/3rdParty/http_tiny/http_lib.c b/src/3rdParty/http_tiny/http_lib.c index 93743a7..8bb7384 100644 --- a/src/3rdParty/http_tiny/http_lib.c +++ b/src/3rdParty/http_tiny/http_lib.c @@ -296,32 +296,26 @@ http_retcode http_put(filename, data, length, overwrite, type) * * limitations: filename is truncated to first 256 characters * and type to 64. + * buf: for now we can't handle the body of the answer to a POST request */ -http_retcode http_post(filename, data_in, length_in, type_in, data_out, length_out, type_out) +http_retcode http_post(filename, data, length, type) char *filename; /* name of the ressource to create */ - char *data_in; /* pointer to the data to send */ - int length_in; /* length of the data to send */ - char *type_in; /* type of the data, if NULL default type is used */ - char **data_out; /* address of a pointer variable which will be set - to point toward allocated memory containing read data.*/ - int *length_out;/* address of integer variable which will be set to - length of the read data */ - char *type_out; /* allocated buffer where the read data type is returned. - If NULL, the type is not returned */ + char *data; /* pointer to the data to send */ + int length; /* length of the data to send */ + char *type; /* type of the data, if NULL default type is used */ { char header[MAXBUF]; - if (type_in) + if (type) sprintf(header,"Content-length: %d\015\012Content-type: %.64s\015\012", - length_in, - type_in + length, + type ); else - sprintf(header,"Content-length: %d\015\012",length_in + sprintf(header,"Content-length: %d\015\012",length ); - return http_query("POST",filename,header,CLOSE, data_out, length_out, type_out); + return http_query("POST",filename,header,CLOSE, data, length, NULL); } - /* * Get data from the server * |