dav-sync: upload files with fixed content-length

Thu, 11 Oct 2018 19:36:16 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 11 Oct 2018 19:36:16 +0200
changeset 479
6a198e156278
parent 478
baa63fef5c5c
child 486
35d17c52d45c

dav-sync: upload files with fixed content-length

dav/sync.c file | annotate | diff | comparison | revisions
--- a/dav/sync.c	Thu Oct 11 19:29:45 2018 +0200
+++ b/dav/sync.c	Thu Oct 11 19:36:16 2018 +0200
@@ -1844,6 +1844,7 @@
     }
     
     dav_set_content(res, in, (dav_read_func)myread, (dav_seek_func)file_seek);
+    dav_set_content_length(res, s.st_size);
     
     if(dir->tagconfig) {
         UcxList *tags = sync_get_file_tags(dir, local, NULL);
@@ -1852,7 +1853,7 @@
             dav_set_property_ns(res, DAV_NS, "tags", prop);
         }
     }
-    
+     
     int ret = -1;
     int created = 0;
     for(int i=0;i<=dir->max_retry;i++) {

mercurial