From e338e157c39965d890dcbfc23d258b28b15536fb Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Fri, 2 Dec 2016 18:43:43 +0100 Subject: [PATCH] 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 --- src/rgw/rgw_rest_swift.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc index 1ed87c6cb1afe..f1a3f787fabdf 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; -- 2.39.5