0005-00000002

更新时间:
复制 MD 格式

Problem description

The x-oss-server-side-encryption header is included on an operation that does not support it.

Causes

The x-oss-server-side-encryption header is only valid for the following operations:

  • PutObject

  • PostObject

  • CopyObject

  • InitiateMultipartUpload

  • AppendObject

Including this header on any other operation — such as DELETE — is not supported. Remove the header from requests to unsupported operations.

Examples

The following request triggers this error because DELETE does not support x-oss-server-side-encryption:

DELETE /ObjectName HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 02 Jan 2019 13:28:38 GMT
Authorization: SignatureValue
x-oss-server-side-encryption:AES256

Solutions

  1. Check whether the operation you are calling supports the x-oss-server-side-encryption header. For details, see Server-side encryption.

  2. If the operation is not in the supported list above, remove the x-oss-server-side-encryption header from the request.