Bug #24098
openrgw: error codes mismatch on malformed acl PUT
0%
Description
RGW returns "InvalidArgument" on PUT acl, when acl is malformed or empty.
Request:
PUT /bucket/?acl HTTP/1.1
Host: [rgw host]
Accept-Encoding: identity
Date: Fri, 11 May 2018 11:08:49 GMT
Content-Length: 31
Authorization: [authorization]
User-Agent: Boto/2.46.1 Python/2.7.12 Linux/4.4.0-121-generic
<AccessControlPolicy>
Response:
HTTP/1.1 400 Bad Request
...
<Error>
<Code>InvalidArgument</Code>
<BucketName>bucket</BucketName>
...
</Error>
AWS S3 returns "MalformedACLError" in this case.
Request:
PUT /?acl HTTP/1.1
Host: bucket.s3.amazonaws.com
Accept-Encoding: identity
Date: Fri, 11 May 2018 12:38:58 GMT
Content-Length: 31
Authorization: [authorization]
User-Agent: Boto/2.46.1 Python/2.7.12 Linux/4.4.0-121-generic
<AccessControlPolicy>
Response:
HTTP/1.1 400 Bad Request
...
<Error>
<Code>MalformedACLError</Code>
<Message>The XML you provided was not well-formed or did not validate against our published schema</Message>
...
</Error>
It seems to me that error code in RGW should be changed according to AWS.