0005-00000414

更新时间:
复制 MD 格式

Problem description

In client-side encryption scenarios, the UploadPart request fails because the value of x-oss-meta-client-side-encryption-cek-alg differs from the value set in the corresponding InitiateMultipartUpload request.

Cause

The value of x-oss-meta-client-side-encryption-cek-alg specified in the UploadPart request is not the same as the value specified in the InitiateMultipartUpload request. OSS returns an error when these values do not match.

Example

The following requests show a header mismatch that causes an error.

Step 1: Initiate the multipart upload — sets value1 as the CEK algorithm.

POST /multipart.data?uploads HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 22 Feb 2012 08:32:21 GMT
x-oss-storage-class: Archive
Authorization: OSS qn6q**************:77Dv****************
x-oss-meta-client-side-encryption-cek-alg: value1

Step 2: Upload a part — sets value2, which does not match value1.

PUT /multipart.data?partNumber=1&uploadId=0004B9895DBBB6EC9****  HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Length: 6291456
Date: Wed, 22 Feb 2012 08:32:21 GMT
Authorization: OSS qn6q**************:77Dv****************
x-oss-meta-client-side-encryption-cek-alg: value2
[6291456 bytes data]

Because value1 != value2, OSS rejects the UploadPart request.

Solution

Set x-oss-meta-client-side-encryption-cek-alg to the same value in both InitiateMultipartUpload and every subsequent UploadPart request.

References