From: Abhishek Lekshmanan Date: Fri, 27 Mar 2020 18:29:01 +0000 (+0100) Subject: rgw: EPERM to ERR_INVALID_REQUEST X-Git-Tag: v16.1.0~2001^2~20 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c9b043b6a4cfbf055eb0700ab819fc7e55b73e5f;p=ceph.git rgw: EPERM to ERR_INVALID_REQUEST As per Robin's comments and S3 spec Signed-off-by: Abhishek Lekshmanan --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 1bfc8312de28..f13ae23dd6c5 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -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;