mirror of
https://github.com/minio/minio-cpp.git
synced 2025-07-30 05:23:05 +03:00
allow checksum headers in single PutObject() (#184)
This commit is contained in:
@ -190,6 +190,10 @@ struct CreateMultipartUploadResponse : public Response {
|
||||
struct PutObjectResponse : public Response {
|
||||
std::string etag;
|
||||
std::string version_id;
|
||||
std::string checksumCRC32;
|
||||
std::string checksumCRC32C;
|
||||
std::string checksumSHA1;
|
||||
std::string checksumSHA256;
|
||||
|
||||
PutObjectResponse() = default;
|
||||
|
||||
|
@ -1384,6 +1384,10 @@ PutObjectResponse BaseClient::PutObject(PutObjectApiArgs args) {
|
||||
PutObjectResponse resp;
|
||||
resp.etag = utils::Trim(response.headers.GetFront("etag"), '"');
|
||||
resp.version_id = response.headers.GetFront("x-amz-version-id");
|
||||
resp.checksumCRC32 = response.headers.GetFront("x-amz-checksum-crc32");
|
||||
resp.checksumCRC32C = response.headers.GetFront("x-amz-checksum-crc32c");
|
||||
resp.checksumSHA1 = response.headers.GetFront("x-amz-checksum-sha1");
|
||||
resp.checksumSHA256 = response.headers.GetFront("x-amz-checksum-sha256");
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
Reference in New Issue
Block a user