0005-00000413

问题描述

客户端加密场景下UploadPart 时请求头x-oss-meta-client-side-encryption-start的值不符合预期。

问题原因

客户端加密场景下,在InitiateMultipartUpload时需要携带请求头x-oss-meta-client-side-encryption-start。在后续UploadPart 时需要带上该请求头传入同样的值。如果该请求头的值与InitiateMultipartUpload时传入的不同则会报此错误。

问题示例

例如您事先发起了一个InitiateMultipartUpload请求:

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: value1

此后您又发起了一个UploadPart请求:

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]

请求头x-oss-meta-client-side-encryption-start的值不符合预期,请求返回失败。

解决方案

确保在UploadPart请求中通过请求头x-oss-meta-client-side-encryption-start传入与InitiateMultipartUpload时相同的值。

相关文档