Copyright © 2010 Caringo, Inc.All rights reserved 36Version 5.0December 2010Chapter 9. SCSP COPYThe following topics in this chapter discuss details about SCSP COPY:• Section 9.1, “Introduction to COPY”• Section 9.2, “Unnamed Object COPY Details”9.1. Introduction to COPYThis section discusses general information about SCSP COPY that applies to both named andunnamed objects.The COPY method copies the content metadata of an existing object verbatim.The syntax of a COPY request is similar to that for an empty PUT request on anchor streams. Anexample for an unnamed object follows. COPY for a named object is the same except you use theobject's name instead of a UUID on the first line of the command.COPY /d5a7fc3fd6102a7c2e4ca4391b579996?alias=true HTTP/1.1Host: cluster.example.comContent-Length: 0x-xml-meta-data-color: bluex-xml-meta-data-weight: 42x-xml-meta-data: largebluelifepoint: [Sunday, 06-Nov-2010 08:49:37 GMT] reps=3, deletable=nolifepoint: [] deleteThe Content-Length header is optional, but if supplied its value must be 0 because there is nocontent body for a COPY request.Any additional headers, like the two DX Storage-* headers in the example and the lifepoint headers,can also be supplied with the request. These metadata headers replace all existing metadataassociated with the given anchor stream, with the exception of Content-length whose valuecontinues to provide the original length of the content data.If the client provides a Content-MD5 header with the COPY request, DX Storage recomputes thedigest of the content data as it copies it and compare it with the provided MD5 hash. Other aspectsof the COPY method, including response codes, are the same as PUT. The COPY method returns aresponse only after all the data has been copied and the anchor stream update is complete.9.2. Unnamed Object COPY DetailsThe UUID returned after a successful COPY will be identical to the one supplied in the request, justlike a PUT or APPEND request.The query argument ?alias=true is a required acknowledgment that the operation is to beperformed on an existing anchor stream, and the object specified by the included UUID mustactually be an anchor stream in DX Storage.Failure to include the ?alias=true argument or perform a COPY on a stream that is not an anchorstream results in a 403 (Forbidden) response from DX Storage.9.3. Normal Responses to COPYFor a list of response headers, see Section 4.6, “Normal Response Headers”.