diff --git a/source/common/router/header_parser_utils.cc b/source/common/router/header_parser_utils.cc index 345e9045498e..f92986d1cdc7 100644 --- a/source/common/router/header_parser_utils.cc +++ b/source/common/router/header_parser_utils.cc @@ -39,7 +39,7 @@ std::string HeaderParser::translateMetadataFormat(const std::string& header_valu } new_format = parsed_params->asObjectArray()[0]->asString(); for (size_t i = 1; i < parsed_params->asObjectArray().size(); i++) { - new_format += ":" + parsed_params->asObjectArray()[i]->asString(); + absl::StrAppend(&new_format, ":", parsed_params->asObjectArray()[i]->asString()); } new_format = absl::StrCat("%", matches[1], "_METADATA(", new_format, ")%"); diff --git a/source/common/runtime/runtime_impl.cc b/source/common/runtime/runtime_impl.cc index 81bc35baaf29..2a4deeee8b2e 100644 --- a/source/common/runtime/runtime_impl.cc +++ b/source/common/runtime/runtime_impl.cc @@ -720,7 +720,7 @@ SnapshotImplPtr LoaderImpl::createNewSnapshot() { std::string path = layer.disk_layer().symlink_root() + "/" + layer.disk_layer().subdirectory(); if (layer.disk_layer().append_service_cluster()) { - path += "/" + service_cluster_; + absl::StrAppend(&path, "/", service_cluster_); } if (api_.fileSystem().directoryExists(path)) { TRY_ASSERT_MAIN_THREAD { diff --git a/source/extensions/filters/udp/dns_filter/dns_filter_utils.cc b/source/extensions/filters/udp/dns_filter/dns_filter_utils.cc index 5b8670b9360d..c37f6d77563d 100644 --- a/source/extensions/filters/udp/dns_filter/dns_filter_utils.cc +++ b/source/extensions/filters/udp/dns_filter/dns_filter_utils.cc @@ -52,11 +52,11 @@ std::string buildServiceName(const std::string& name, const std::string& proto, if (name[0] != '_') { result += "_"; } - result += name + "."; + absl::StrAppend(&result, name, "."); if (proto[0] != '_') { result += "_"; } - result += proto + '.' + domain; + absl::StrAppend(&result, proto, ".", domain); return result; }