Problem description
In a client-side encryption multipart upload, the x-oss-meta-client-side-encryption-start header value in the UploadPart request does not match the value set in the corresponding InitiateMultipartUpload request.
Causes
OSS requires the x-oss-meta-client-side-encryption-start header to carry the same value in both the InitiateMultipartUpload request and every UploadPart request for the same multipart upload. If the values differ, OSS rejects the UploadPart request with an error.
Examples
The following example shows a header value mismatch that triggers the error.
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-start: value1UploadPart request — sets the header to value2 (mismatch):
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-start: value2
[6291456 bytes data]Because value1 ≠ value2, OSS returns an error for the UploadPart request.
Solutions
Set x-oss-meta-client-side-encryption-start to the same value in the InitiateMultipartUpload request and in every UploadPart request for the same multipart upload.