Problem description
The fields in the Authorization header are in invalid formats.
Causes
You initiated a request that used the Amazon S3-compatible V4 signature, but the fields in the Authorization header are in invalid formats.
Examples
The following code provides request that uses the S3-compatible V4 signature. The Authorization header has fields in invalid formats.
GET /test.txt HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization:AWS4-HMAC-SHA256 Credential=LTAI****************/20221220/us-east-1/s3/aws4_requestSignedHeaders=host;x-amz-content-sha256;x-amz-dateSignature=ab2s********************
x-amz-content-sha256: abc***
x-amz-date: 20221220T084818Z
x-oss-s3-compat: trueYou must include the Credential, SignedHeaders, and Signature fields in the Authorization header. Separate the fields with commas (,). In the preceding example, the Credential and SignedHeaders fields are not separated by commas (,).
Solutions
Make sure that the Authorization header is complete and is in the valid format.
GET /test.txt HTTP/1.0
Date: Tue, 20 Dec 2022 08:48:18 GMT
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Authorization:AWS4-HMAC-SHA256 Credential=LTAI****************/20221220/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=ab2s********************
x-amz-content-sha256: abc****
x-amz-date: 20221220T084818Z
x-oss-s3-compat: trueWe recommend that you use Amazon S3 SDKs to initiate the request. For more information, see Use Amazon S3 SDKs to access OSS.