...
The APPEND operation is no longer supported. If providing a gencontentmd5 query argument on an APPEND, it returns a 400 Bad Request error response.
The COPY operation is supported if providing a gencontentmd5 query argument on the existing object's write; otherwise the COPY operation fails.
For a range read (a GET request with the Range header), Swarm suppresses any stored Content-MD5 from the response headers and instead return a Content-MD5 for the requested range as a trailing header.
Example Download Verification
You can verify the integrity of a download from Swarm by checking the Content-MD5 published in an object’s header with the base64 encoded MD5 digest of the downloaded object. An example of how this is performed using the ‘openssl’ utility is outlined below:
Code Block |
---|
$ curl -sI https://support.cloud.datacore.com/tools/swarm-support-tools.tgz
HTTP/1.1 200 OK
Date: Tue, 10 Jan 2023 19:12:40 GMT
Gateway-Request-Id: A0A1788FF937057D
Server: CAStor Cluster/15.0.1
Via: 1.1 support.cloud.datacore.com (Cloud Gateway SCSP/7.10.2)
Gateway-Protocol: scsp
CAStor-application: CaringoTechSupport
Castor-System-CID: 664727e752ca7a48092c73699e909578
Castor-System-Cluster: gem.tx.caringo.com
Castor-System-Created: Mon, 09 Jan 2023 18:25:17 GMT
Castor-System-Name: swarm-support-tools.tgz
Castor-System-Version: 1673288717.693
Content-Type: application/x-www-form-urlencoded
Last-Modified: Mon, 09 Jan 2023 18:25:17 GMT
X-Last-Modified-By-Meta: tools+swarm
X-Owner-Meta: tools+swarm
Manifest: ec
ETag: "b5dea5b4048f21a0f99880873fa64865"
Castor-System-Path: /support.cloud.datacore.com/tools/swarm-support-tools.tgz
Castor-System-Domain: support.cloud.datacore.com
Volume: 1dc47666d09cdb27bd59cbb731d046ca
Content-MD5: EF8xHMmzt3xNjpksfRLo+A==
Content-Length: 28398358
$ curl -O https://support.cloud.datacore.com/tools/swarm-support-tools.tgz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 27.0M 100 27.0M 0 0 2928k 0 0:00:09 0:00:09 --:--:-- 2826k
$ cat swarm-support-tools.tgz | openssl.exe dgst -md5 -binary | openssl enc -base64
EF8xHMmzt3xNjpksfRLo+A==
|