luminous: multisite: es sync null versioned object failed because of olh info
Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
continue;
}
- if (attr_name.compare(0, sizeof(RGW_ATTR_META_PREFIX) - 1, RGW_ATTR_META_PREFIX) == 0) {
+ if (boost::algorithm::starts_with(attr_name, RGW_ATTR_META_PREFIX)) {
custom_meta.emplace(attr_name.substr(sizeof(RGW_ATTR_META_PREFIX) - 1),
- string(val.c_str(), (val.length() > 0 ? val.length() - 1 : 0)));
+ string(val.c_str(), attr_len(val)));
continue;
}