From c1973886c86931d0eb055909552ecdc184aa36e6 Mon Sep 17 00:00:00 2001 From: weiqiaomiao Date: Thu, 19 May 2016 18:18:07 +0800 Subject: [PATCH] rgw: we should probably return InvalidArgument when XML_parser fails of the RGWPutACLs op when input xml documention is invalid, bucket put acls fails, but RGW return -EACCESS, which appears as AceessDenied to the client, we should probably return _EINVAL(InvalidArgument) instead Signed-off-by: weiqiaomiao --- src/rgw/rgw_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index e833a196fa74..efbfdfd64748 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -3409,7 +3409,7 @@ void RGWPutACLs::execute() } if (!parser.parse(data, len, 1)) { - op_ret = -EACCES; + op_ret = -EINVAL; return; } policy = static_cast(parser.find_first("AccessControlPolicy")); -- 2.47.3