Merge pull request #40563 from BryceCao/wip_add_check_for_sync_url

rgw : add check empty for sync url

Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
J. Eric Ivancich 2021-05-10 10:32:39 -04:00 committed by GitHub
commit c48fe06e3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -813,7 +813,7 @@ int RGWRESTStreamRWRequest::do_send_prepare(const DoutPrefixProvider *dpp, RGWAc
bufferlist *send_data)
{
string new_url = url;
if (new_url[new_url.size() - 1] != '/')
if (!new_url.empty() && new_url.back() != '/')
new_url.append("/");
string new_resource;