The XML request body is invalid. This error occurs when a PutObjectTagging request is sent with a malformed XML body that does not conform to XML specifications.
Problem description
The XML request body is invalid.
Causes
The request body structure does not conform to XML specifications. For example, a required closing tag is missing.
Examples
The following request is missing the closing </Tagging> tag, which makes the request body invalid:
PUT /objectname?tagging
Content-Length: xxx
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: Mon, 18 Mar 2019 08:25:17 GMT
Authorization: SignatureValue
<Tagging>
<TagSet>
<Tag>
<Key>Key</Key>
<Value>Value</Value>
</Tag>
</TagSet>Solutions
Make sure the request body is well-formed XML with all tags properly closed. The following example shows a valid request:
PUT /objectname?tagging
Content-Length: xxx
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: Mon, 18 Mar 2019 08:25:17 GMT
Authorization: SignatureValue
<Tagging>
<TagSet>
<Tag>
<Key>Key</Key>
<Value>Value</Value>
</Tag>
</TagSet>
</Tagging>References
该文章对您有帮助吗?