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:AES256Solutions
Check whether the operation you are calling supports the
x-oss-server-side-encryptionheader. For details, see Server-side encryption.If the operation is not in the supported list above, remove the
x-oss-server-side-encryptionheader from the request.
该文章对您有帮助吗?