]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: EPERM to ERR_INVALID_REQUEST
authorAbhishek Lekshmanan <abhishek@suse.com>
Fri, 27 Mar 2020 18:29:01 +0000 (19:29 +0100)
committerAbhishek Lekshmanan <abhishek@suse.com>
Wed, 8 Apr 2020 16:39:40 +0000 (18:39 +0200)
As per Robin's comments and S3 spec

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
src/rgw/rgw_rest_s3.cc

index 1bfc8312de28bd26ec2ec50e8580500afcd20147..f13ae23dd6c509971a3c6f5350d47f8ceb4abe2c 100644 (file)
@@ -301,7 +301,7 @@ int RGWGetObj_ObjStore_S3::send_response_data(bufferlist& bl, off_t bl_ofs,
        /* reject unauthenticated response header manipulation, see
         * https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html */
        if (s->auth.identity->is_anonymous()) {
-         return -EPERM;
+         return -ERR_INVALID_REQUEST;
        }
        if (strcmp(p->param, "response-content-type") != 0) {
          response_attrs[p->http_attr] = val;