pos = copy_source_bucket_name.find("/");
if (pos == std::string::npos) {
ret = -EINVAL;
- ldout(s->cct, 0) << "x-amz-copy-source bad format" << dendl;
+ ldout(s->cct, 5) << "x-amz-copy-source bad format" << dendl;
return ret;
}
copy_source_object_name = copy_source_bucket_name.substr(pos + 1, copy_source_bucket_name.size());
} else {
copy_source_tenant_name = copy_source_bucket_name.substr(0, pos);
copy_source_bucket_name = copy_source_bucket_name.substr(pos + 1, copy_source_bucket_name.size());
+ if (copy_source_bucket_name.empty()) {
+ ret = -EINVAL;
+ ldout(s->cct, 5) << "source bucket name is empty" << dendl;
+ return ret;
+ }
}
ret = store->get_bucket_info(obj_ctx,
copy_source_tenant_name,
copy_source_bucket_info,
NULL, &src_attrs);
if (ret < 0) {
+ ldout(s->cct, 5) << __func__ << "(): get_bucket_info() returned ret=" << ret << dendl;
return ret;
}
pos = range.find("=");
if (pos == std::string::npos) {
ret = -EINVAL;
- ldout(s->cct, 0) << "x-amz-copy-source-range bad format" << dendl;
+ ldout(s->cct, 5) << "x-amz-copy-source-range bad format" << dendl;
return ret;
}
range = range.substr(pos + 1, range.size());
pos = range.find("-");
if (pos == std::string::npos) {
ret = -EINVAL;
- ldout(s->cct, 0) << "x-amz-copy-source-range bad format" << dendl;
+ ldout(s->cct, 5) << "x-amz-copy-source-range bad format" << dendl;
return ret;
}
string first = range.substr(0, pos);