다음을 통해 공유


Replication and the MOVE Method

Topic Last Modified: 2006-06-12

A client can use the MOVE Method to either move an existing resource or rename an existing resource. The MOVE Method in the context of WebDAV replication is used to upload a move or rename change for a particular resource. The server does not return a resourcetag as a result of the execution of a MOVE Method operation, and it is the client's responsibility to fetch the resourcetag of a resource at the destination. If the server changes the object's repl-uid, the server returns a repl-uid in a header with the new value of the repl-uid. Note: The updated repl-uid is not returned on a MOVE Method response or a COPY Method response.

MOVE method with version checking

Usually, the client would like to verify that the correct version of a resource is being moved. If the client has previously downloaded content or properties of a resource, the server returned the resourcetag of that particular resource. Under these circumstances, the client can include the resourcetag in the request If Header of a MOVE Method in the form of:

If: (<resourcetag>) or If: (<repl-uid>)

The If: (<resourcetag>) or If: (<repl-uid>) condition will evaluate to FALSE, thus cancelling the move, if the specified resourcetag or the repl-uid doesn't match the resourcetag or the repl-uid of the resource.

MOVE method with server-side modifications

Sometimes the MOVE Method can trigger an action on the server that results in a successful overwrite from the client perspective, but modifications or transformations on the server resulting in content and/or properties mismatch between the client and server.

In this case, the status code 210 Content Different is returned. The response should also include information about what was affected during the execution of the MOVE Method on the server.

In order to solve this mismatch problem, the client may need to re-fetch the contents and/or properties of the affected resource using the GET method or PROPFIND Method.

MOVE Method to prevent inadvertent overwrite of an existing resource

The client may want to check if the resource it is intending to move already exists at the destination, and if so might not want to overwrite the existing contents. In this case the client should include the following request Overwrite Header in the MOVE Method request so as to avoid overwriting an existing resource:

Overwrite: F