Signed-off-by: chixinze <xmdxcxz@gmail.com> (cherry picked from commit ac0cf1417005186b4542f7e56d6815605e6d2c5c)
29 lines
978 B
Diff
29 lines
978 B
Diff
From 607a65fccd8a80c2f2c74853a6dc5c14ed8a75c1 Mon Sep 17 00:00:00 2001
|
|
From: Abhishek Lekshmanan <abhishek@suse.com>
|
|
Date: Fri, 27 Mar 2020 19:29:01 +0100
|
|
Subject: [PATCH] rgw: EPERM to ERR_INVALID_REQUEST
|
|
|
|
As per Robin's comments and S3 spec
|
|
|
|
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
|
|
---
|
|
src/rgw/rgw_rest_s3.cc | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc
|
|
index 5dc6a562051..dc49caae18d 100644
|
|
--- a/src/rgw/rgw_rest_s3.cc
|
|
+++ b/src/rgw/rgw_rest_s3.cc
|
|
@@ -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;
|
|
--
|
|
2.23.0
|
|
|