]> 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 15:35:07 +0000 (17:35 +0200)
As per Robin's comments and S3 spec

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

index 5dc6a5620513be68dbd631a47cda38abbd37d5af..dc49caae18d2d4860629b072aa710ca78c12fb69 100644 (file)
@@ -269,7 +269,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;