summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2024-01-29 23:38:35 +0300
committerdefanor <defanor@uberspace.net>2024-01-29 23:38:35 +0300
commit9ac356511b2da0602a7f02ff54b30f2ab0bba07d (patch)
tree6b747f1255d2326217345d82a69e81c92518d720
parent595596d74a3c5029af65b91f5d908804c68d41c2 (diff)
Set CURLOPT_INFILESIZE on HTTP file uploadHEADmaster
-rw-r--r--README3
-rw-r--r--src/rexmpp_http_upload.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/README b/README
index 1a1716a..858b59c 100644
--- a/README
+++ b/README
@@ -75,7 +75,8 @@ A rough roadmap:
[+] Abstraction of the used XML, SASL, TLS, and DNS libraries, and
optional usage of alternative ones.
[.] Automated testing.
-[.] Alternative module implementations in Rust.
+[.] Alternative module implementations in Rust (looks like there is a
+ memory leak somewhere around those though).
- IM features:
diff --git a/src/rexmpp_http_upload.c b/src/rexmpp_http_upload.c
index 5d13f97..18a3302 100644
--- a/src/rexmpp_http_upload.c
+++ b/src/rexmpp_http_upload.c
@@ -66,6 +66,7 @@ void rexmpp_http_upload_slot_cb (rexmpp_t *s,
curl_easy_setopt(ce, CURLOPT_UPLOAD, 1);
curl_easy_setopt(ce, CURLOPT_READDATA, task->fh);
curl_easy_setopt(ce, CURLOPT_URL, put_url);
+ curl_easy_setopt(ce, CURLOPT_INFILESIZE, task->fsize);
rexmpp_xml_t *header = rexmpp_xml_first_elem_child(put);
while (header) {