From: Radoslaw Zarzynski Date: Fri, 2 Dec 2016 17:43:43 +0000 (+0100) Subject: rgw: FormPost returns 401 Unauthorized instead of 403 Forbidden. X-Git-Tag: v12.0.3~99^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e338e157c39965d890dcbfc23d258b28b15536fb;p=ceph.git rgw: FormPost returns 401 Unauthorized instead of 403 Forbidden. This patch emerged because newer versions of Tempest became more restrictive in the matter of FormPost's error handling. Previously, Tempest was accepting both 403 Forbidden as well as 401 Unauthorized as a response for signature mismatch or expired form. Actually only the second one is acceptable for tempest.api.object_storage.test_object_formpost_negative.* Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc index 1ed87c6cb1af..f1a3f787fabd 100644 --- a/src/rgw/rgw_rest_swift.cc +++ b/src/rgw/rgw_rest_swift.cc @@ -1877,12 +1877,12 @@ int RGWFormPost::get_params() if (! is_non_expired()) { err_msg = "FormPost: Form Expired"; - return -EACCES; + return -EPERM; } if (! is_integral()) { err_msg = "FormPost: Invalid Signature"; - return -EACCES; + return -EPERM; } return 0;