What problem are you are trying to solve?
Currently, WebDAV's Putstream
feature is disabled for all vendors except owncloud:
Which will result in 1. A warning when using rclone mount
with webdav server:
and 2. RCat
operation in rclone mount
will create a temporary local fs, copy the object to tmpLocalFs, finally sending the whole object to webdav server:
Therefore, when copying a file to a mounted webdav server, the progress bar will finish in a second, but the file is actually being uploaded in the background.
This is not user friendly as completed file uploading cannot be indicated by a finished progress bar.
How do you think rclone should be changed to solve that?
If a webdav remote supports partial update, then we could provide PutStream
feature based on its partial update specification, so the problem is resolved.
Although how partial update should work is not specified in webdav specification, there are several non-standard ways implemented by some widely used webdav providers:
New open source webdav servers generally recognize these two implementations as de facto standard, like this rust implementation for webdav server. So, by supporting these two partial update methods, varieties of webdav remotes will benefit from it.
These two methods all provide some ways to inform clients of their existence.
If you want to be compliant with SabreDAV's implementation of PATCH, you must also return 'sabredav-partialupdate' in the 'DAV:' header:
HTTP/1.1 204 No Content DAV: 1, 2, 3, sabredav-partialupdate, extended-mkcol
This is only required if you are adding this feature to a DAV server. For non-webdav implementations such as REST services this is optional.
There is no official way to know if PUT-with-content-range is supported by a webserver. For a client it's probably best to do an OPTIONS request, and then check two things:
- the
Server
header must contain the wordApache
- the
DAV
header must contain<http://apache.org/dav/propset/fs/1>
.In that case, your are sure to talk to an Apache webserver with mod_dav enabled.
Therefore, support of partial update feature could be auto-detected and hence no need to change the option (Or maybe some vendors could be added to allow users to manually indicate partial update is supported?).
If this is a feature worth to support, I am willing to implement it myself, and hence seek for suggestions and guidance about the desired design, where to put the auto detection code, etc.