mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-31 13:00:49 +00:00
Fixed mg_fetch() by passing a buffer, placeholder for the reply headers
This commit is contained in:
1 parent
84e26ccddd
commit
a9bb7d78ab
3 files changed
+28
-20
No files matched your search
+2
-1
@@ -234,12 +234,13 @@ void mg_close_connection(struct mg_connection *conn);
|
||||
// url: URL to download
|
||||
// path: file name where to save the data
|
||||
// request_info: pointer to a structure that will hold parsed reply headers
|
||||
// buf, bul_len: a buffer for the reply headers
|
||||
// Return:
|
||||
// On success, opened file stream to the downloaded contents. The stream
|
||||
// is positioned to the end of the file.
|
||||
// On error, NULL
|
||||
FILE *mg_fetch(struct mg_context *ctx, const char *url, const char *path,
|
||||
struct mg_request_info *request_info);
|
||||
char *buf, size_t buf_len, struct mg_request_info *request_info);
|
||||
|
||||
|
||||
// Convenience function -- create detached thread.
|
||||
|
||||
Reference in new issue
Block a user