This is a conventional S3 request--omitting the body causes ordinary,
no-body v4 signature checking to be selected (when signing is
AWS_HMAC_SHA256).
Fixes: https://tracker.ceph.com/issues/43148
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
if (ret_auth < 0) {
return ret_auth;
}
+ } else {
+ /* a request body is not required an S3 PutACLs request--n.b.,
+ * s->length is non-null iff a content length was parsed (the
+ * ACP or canned ACL could be in any of 3 headers, don't worry
+ * about that here) */
+ if ((ret == -ERR_LENGTH_REQUIRED) &&
+ !!(s->length)) {
+ return 0;
+ }
}
return ret;
}