I'm doing copy between two WebDAV endpoints. When issuing the copy call, rclone may try to use the WebDAV COPY method. The COPY request should go to the source endpoint as per current WebDAV specification. Rclone however sends the request to the destination. This is incorrect.
Run the command 'rclone version' and share the full output of the command.
In the source folder there are files to be found. Rclone discovers them correctly. And also the folder tree structure is recreated correctly at the destination. However for each file rclone will do a COPY method request to the destination instead of the resource:
COPY http://dest-endpoint/remote.php/webdav/home/DataTransfers/mydata/test1.txt
Destination: http://dest-endpoint/remote.php/webdav/home/DataTransfers/mydata/test1.txt
Overwrite: F
...
So, Destination is correctly set but the COPY request should be directed to http://source-endpoint/remote.php/webdav/home/mydata/test1.txt
When I 'hack' the code in the webdav copy implementation such that this is corrected everything works as expected.
I'm unfortunately unable to discover the proper fix here.
I hope someone with more in-depth rclone code knowledge can have a look at this.
I'm assuming that you are talking about the examples? They use the same server indeed.
But true, the rfc is not very explicit about this, '... implemented incorrectly' may be a bit harsh.
However:
The rfc basically states that source and destination resources are URIs. So that does not rule out different servers.
And further, Status code 502 (Bad Gateway) in the rfc does actually mention the possibility of the destination being on another server.
So in case of different servers that means you would automatically do the request on the source server (or at least the server who has access to the source resource), otherwise having a Destination header would not make sense.
And implementing the WebDAV COPY request this way still supports same server copy.
Have you found some docs to support that the COPY should be sent to the source not the destination?
Projects/servers I know of that interpret WebDAV COPY this way are dCache and Rucio which basically follows HttpTpcTechnical < LCG < TWiki. These servers partly also extend WebDAV COPY from the rfc but don't go against it.
Yes, I would think so. COPY plus delete source resource right?