File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -1407,16 +1407,20 @@ int RGWOp::do_aws4_auth_completion()
14071407{
14081408 ldpp_dout (this , 5 ) << " NOTICE: call to do_aws4_auth_completion" << dendl;
14091409 if (s->auth .completer ) {
1410- if (!s->auth .completer ->complete ()) {
1411- return -ERR_AMZ_CONTENT_SHA256_MISMATCH;
1412- } else {
1413- ldpp_dout (this , 10 ) << " v4 auth ok -- do_aws4_auth_completion" << dendl;
1414- }
1415-
14161410 /* TODO(rzarzynski): yes, we're really called twice on PUTs. Only first
14171411 * call passes, so we disable second one. This is old behaviour, sorry!
14181412 * Plan for tomorrow: seek and destroy. */
1419- s->auth .completer = nullptr ;
1413+ auto completer = std::move (s->auth .completer );
1414+
1415+ try {
1416+ if (!completer->complete ()) {
1417+ return -ERR_AMZ_CONTENT_SHA256_MISMATCH;
1418+ }
1419+ } catch (const rgw::io::Exception& e) {
1420+ return -e.code ().value ();
1421+ }
1422+
1423+ ldpp_dout (this , 10 ) << " v4 auth ok -- do_aws4_auth_completion" << dendl;
14201424 }
14211425
14221426 return 0 ;
You can’t perform that action at this time.
0 commit comments