Web Distributed Authoring and Versioning (WebDAV) is an extension of the Hypertext Transfer Protocol (HTTP) that facilitates collaboration between users in editing and managing documents and files stored on World Wide Web servers.
The full specification of WebDAV is described in below link

 

HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)

The protocol consists of a set of new methods and headers for use in HTTP. The added methods include:
  PROPFIND — used to retrieve properties, stored as XML, from a web resource. It is also
  overloaded to allow one to retrieve the collection structure (a.k.a. directory hierarchy) of a
  remote system.
  PROPPATCH — used to change and delete multiple properties on a resource in a single atomic act
  MKCOL — used to create collections (a.k.a. a directory)
  COPY — used to copy a resource from one URI to another
  MOVE — used to move a resource from one URI to another
  LOCK — used to put a lock on a resource. WebDAV supports both shared and exclusive locks.
  UNLOCK — used to remove a lock from a resource

However, in different WebDAV, not all HTTP methods are implemented, in below I show you how to get list of supported methods and how to use some of them with examples(I use WebDAV door implemented by dCache)

Show supported methods

curl -i -X OPTIONS <WebDAV endpoint>
$curl --cacert /tmp/x509up_u501 --capath /etc/grid-security/certificates/  --key \
/tmp/x509up_u501 -E /tmp/x509up_u501 -i -X OPTIONS https://<WebDAVdoor>:2880/.../test
DAV: 1, 2
MS-Author-Via: DAV
Server: milton.io-2.0.0
Date: Mon, 23 Jun 2014 20:50:23 GMT
Accept-Ranges: bytes
ETag: "000052D745E1F2B04A0FAE529ADD2FB77D62_-656094041"
Allow: DELETE,MKCOL,PROPFIND,GET,HEAD,PROPPATCH,OPTIONS,MOVE,PUT,GET,HEAD
Content-Length: 0

The line in red color shows the list of methods the WebDAV implemented in dCache supports

Head method  -- check the file status

Webdav file exist check, http HEAD command

Instead of using -X HEAD, it's better to use -I --head
(HTTP/FTP/FILE)  Fetch the HTTP-header only! HTTP-servers feature the command HEAD which this uses to get nothing but the header of a document. When used on a FTP or FILE file, curl displays the file size and last modification time only.

$curl --cacert /tmp/x509up_u501 --capath /etc/grid-security/certificates/  --key \
/tmp/x509up_u501 -E /tmp/x509up_u501 -I --head  https://<WebDAVdoor>:2880/.../test
HTTP/1.1 200 OK
Server: milton.io-2.0.0
Date: Mon, 23 Jun 2014 21:38:33 GMT
Accept-Ranges: bytes
ETag: "000052D745E1F2B04A0FAE529ADD2FB77D62_-656094041"
Last-Modified: Wed, 07 May 2014 22:54:04 GMT
Content-Length: 3111368

MKCOL method

curl --cacert /tmp/x509up_u501 --capath /etc/grid-security/certificates/ --key \
/tmp/x509up_u501 -E /tmp/x509up_u501 -X MKCOL "<webdavdoor>/aa"

MOVE method

curl --cacert /tmp/x509up_u501 --capath /etc/grid-security/certificates/ --key \
/tmp/x509up_u501 -E /tmp/x509up_u501 -H "Destination:https://<WebDAV>/.../aa/bb/newtest" \
-X MOVE https://<WebDAVdoor>:2880/.../test

DELETE method

curl --cacert /tmp/x509up_u501 --capath /etc/grid-security/certificates/ --key \
/tmp/x509up_u501 -E /tmp/x509up_u501 -X DELETE "<WebDAVdoor>/aa"

Regular copy to local server

curl --cacert /tmp/x509up_u501 --capath /etc/grid-security/certificates/ --cert \
/tmp/x509up_u501 -o ./localfile -L https://<WebDAV>:2880/.../testfile -3

 

More info about curl with SSL, see my another article

curl example with server ssl certificate

 

In addition to this article, I have a test script attached below shows the renaming process, also do the time evaluation as well.

#!/bin/bash
s0=`date +%s%N`
curl --cacert /tmp/x509up_u501 --capath /etc/grid-security/certificates/ --key /tmp/x509up_u501 \
-E /tmp/x509up_u501 -I --head "https://<webdavdoor>/aa/bb/test"
s1=`date +%s%N`
let s_gap=($s1-$s0)/1000000

echo "step 1:HEAD time elapsed $s_gap ms"
curl --cacert /tmp/x509up_u501 --capath /etc/grid-security/certificates/ --key /tmp/x509up_u501 \
-E /tmp/x509up_u501 -I --head "https://<webdavdoor>/test"
s2=`date +%s%N`
let s_gap=($s2-$s1)/1000000

echo "step 2 HEAD time elapsed $s_gap ms"
curl --cacert /tmp/x509up_u501 --capath /etc/grid-security/certificates/ --key /tmp/x509up_u501 \
-E /tmp/x509up_u501 -I --head "https://<webdavdoor>/aa/bb"
s3=`date +%s%N`
let s_gap=($s3-$s2)/1000000

echo "step 3 HEAD time elapsed $s_gap ms"
curl --cacert /tmp/x509up_u501 --capath /etc/grid-security/certificates/ --key /tmp/x509up_u501 \
-E /tmp/x509up_u501 -I --head "https://<webdavdoor>/aa"
s4=`date +%s%N`
let s_gap=($s4-$s3)/1000000

echo "step 4 HEAD time elapsed $s_gap ms"
curl --cacert /tmp/x509up_u501 --capath /etc/grid-security/certificates/ --key /tmp/x509up_u501 \
-E /tmp/x509up_u501 -X MKCOL "<webdavdoor>/aa"
s5=`date +%s%N`
let s_gap=($s5-$s4)/1000000

echo "step 5 MKCOL time elapsed $s_gap ms"
curl --cacert /tmp/x509up_u501 --capath /etc/grid-security/certificates/ --key /tmp/x509up_u501 \
-E /tmp/x509up_u501 -X MKCOL "<webdavdoor>/aa/bb"
s6=`date +%s%N`
let s_gap=($s6-$s5)/1000000

echo "step 6 MKCOL time elapsed $s_gap ms"
curl --cacert /tmp/x509up_u501 --capath /etc/grid-security/certificates/ --key /tmp/x509up_u501 \
-E /tmp/x509up_u501 -H "Destination:https://<webdavdoor>/aa/bb/test" -X MOVE \
https://<WebDavdoor>:2880/test
s7=`date +%s%N`
let s_gap=($s7-$s6)/1000000

echo "step 7 MOVE time elapsed $s_gap ms"
let s_gap=($s7-$s0)/1000000
echo "total time elapsed $s_gap ms"