From: weiqiaomiao Date: Thu, 19 May 2016 10:18:07 +0000 (+0800) Subject: rgw: we should probably return InvalidArgument when XML_parser fails of the RGWPutACLs op X-Git-Tag: v11.0.0~417^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c1973886c86931d0eb055909552ecdc184aa36e6;p=ceph.git 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 --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index e833a196fa7..efbfdfd6474 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"));