dav-sync: upload files with fixed content-length v1.2

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

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 11 Oct 2018 19:36:16 +0200
branch
v1.2
changeset 482
d96464f42b84
parent 481
ff477f1f7765
child 483
7ed43dd4d5bf

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
@@ -1783,6 +1783,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);
@@ -1791,7 +1792,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