mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-19 19:40:56 +00:00
Increase local file buffer size in mg_http_upload()
This commit is contained in:
1 parent
00db56f7d7
commit
309668ccbc
3 files changed
+7
-3
No files matched your search
+1
-1
@@ -3135,7 +3135,7 @@ bool mg_http_match_uri(const struct mg_http_message *hm, const char *glob) {
|
|||||||
|
|
||||||
long mg_http_upload(struct mg_connection *c, struct mg_http_message *hm,
|
long mg_http_upload(struct mg_connection *c, struct mg_http_message *hm,
|
||||||
struct mg_fs *fs, const char *dir, size_t max_size) {
|
struct mg_fs *fs, const char *dir, size_t max_size) {
|
||||||
char buf[20] = "0", file[40], path[MG_PATH_MAX];
|
char buf[20] = "0", file[MG_PATH_MAX], path[MG_PATH_MAX];
|
||||||
long res = 0, offset;
|
long res = 0, offset;
|
||||||
mg_http_get_var(&hm->query, "offset", buf, sizeof(buf));
|
mg_http_get_var(&hm->query, "offset", buf, sizeof(buf));
|
||||||
mg_http_get_var(&hm->query, "file", file, sizeof(file));
|
mg_http_get_var(&hm->query, "file", file, sizeof(file));
|
||||||
|
|||||||
+1
-1
@@ -919,7 +919,7 @@ bool mg_http_match_uri(const struct mg_http_message *hm, const char *glob) {
|
|||||||
|
|
||||||
long mg_http_upload(struct mg_connection *c, struct mg_http_message *hm,
|
long mg_http_upload(struct mg_connection *c, struct mg_http_message *hm,
|
||||||
struct mg_fs *fs, const char *dir, size_t max_size) {
|
struct mg_fs *fs, const char *dir, size_t max_size) {
|
||||||
char buf[20] = "0", file[40], path[MG_PATH_MAX];
|
char buf[20] = "0", file[MG_PATH_MAX], path[MG_PATH_MAX];
|
||||||
long res = 0, offset;
|
long res = 0, offset;
|
||||||
mg_http_get_var(&hm->query, "offset", buf, sizeof(buf));
|
mg_http_get_var(&hm->query, "offset", buf, sizeof(buf));
|
||||||
mg_http_get_var(&hm->query, "file", file, sizeof(file));
|
mg_http_get_var(&hm->query, "file", file, sizeof(file));
|
||||||
|
|||||||
+5
-1
@@ -3359,7 +3359,6 @@ int main(void) {
|
|||||||
test_iobuf();
|
test_iobuf();
|
||||||
test_base64();
|
test_base64();
|
||||||
test_http_get_var();
|
test_http_get_var();
|
||||||
test_http_client();
|
|
||||||
test_tls();
|
test_tls();
|
||||||
test_ws();
|
test_ws();
|
||||||
test_ws_fragmentation();
|
test_ws_fragmentation();
|
||||||
@@ -3369,8 +3368,13 @@ int main(void) {
|
|||||||
test_http_no_content_length();
|
test_http_no_content_length();
|
||||||
test_http_pipeline();
|
test_http_pipeline();
|
||||||
test_http_range();
|
test_http_range();
|
||||||
|
#ifndef LOCALHOST_ONLY
|
||||||
test_sntp();
|
test_sntp();
|
||||||
test_mqtt();
|
test_mqtt();
|
||||||
|
test_http_client();
|
||||||
|
#else
|
||||||
|
(void) test_sntp, (void) test_mqtt, (void) test_http_client;
|
||||||
|
#endif
|
||||||
test_poll();
|
test_poll();
|
||||||
test_md5();
|
test_md5();
|
||||||
test_sha1();
|
test_sha1();
|
||||||
|
|||||||
Reference in new issue
Block a user