diff --git a/utils/s3/client.cc b/utils/s3/client.cc index b709623605..584f55c115 100644 --- a/utils/s3/client.cc +++ b/utils/s3/client.cc @@ -6,6 +6,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ +#include #include #include #include @@ -222,16 +223,16 @@ future<> client::upload_sink::do_flush() { } sstring parse_multipart_upload_id(sstring& body) { - rapidxml::xml_document<> doc; + auto doc = std::make_unique>(); try { - doc.parse<0>(body.data()); + doc->parse<0>(body.data()); } catch (const rapidxml::parse_error& e) { s3l.warn("cannot parse initiate multipart upload response: {}", e.what()); // The caller is supposed to check the upload-id to be empty // and handle the error the way it prefers return ""; } - auto root_node = doc.first_node("InitiateMultipartUploadResult"); + auto root_node = doc->first_node("InitiateMultipartUploadResult"); auto uploadid_node = root_node->first_node("UploadId"); return uploadid_node->value(); }