Problem description
The x-oss-meta-client-side-encryption-key header in an UploadPart request has a different value than the one specified in the corresponding InitiateMultipartUpload request.
Causes
The value of the x-oss-meta-client-side-encryption-key header specified in the UploadPart request is not the same as the value specified in the InitiateMultipartUpload request.
Examples
The following InitiateMultipartUpload request sets the header to value1:
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-key: value1The following UploadPart request sets the header to value2, which does not match:
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-key: value2
[6291456 bytes data]Because value1 and value2 differ, the UploadPart request fails.
Solutions
Set x-oss-meta-client-side-encryption-key to the same value in both the InitiateMultipartUpload request and every UploadPart request. For example, if the InitiateMultipartUpload request uses value1, each UploadPart request must also use 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-key: value1
[6291456 bytes data]