0017-00000502
Updated at:
Problem description
The value of the Content-MD5 header in your request is invalid.
Causes
Content-MD5 is the Base64-encoded 128-bit MD5 digest of the request body (excluding headers), as defined in RFC 1864. OSS uses this value to verify that the data received matches what was sent.
This error is caused by an invalid Content-MD5 format: the value is malformed. For example, the Base64-decoded value is fewer than 16 bytes.
Examples
The following PUT request includes a Content-MD5 header for integrity verification:
PUT /ObjectName HTTP/1.1
Content-Length: ContentLength
Content-Type: ContentType
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Content-MD5: eB5eJF1ptWaXm4bijS****==
Authorization: SignatureValueSolutions
Compute Content-MD5 correctly:
Calculate the MD5 digest of the request body (the raw bytes, excluding any HTTP headers).
The digest must be exactly 16 bytes (128 bits).
Base64-encode the 16-byte digest.
Set the result as the value of the
Content-MD5header.
References
Is this page helpful?