summaryrefslogtreecommitdiff
path: root/redfish-core/include/redfish_aggregator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'redfish-core/include/redfish_aggregator.hpp')
-rw-r--r--redfish-core/include/redfish_aggregator.hpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp
index 4ce25fdcf3..f255b9f0a6 100644
--- a/redfish-core/include/redfish_aggregator.hpp
+++ b/redfish-core/include/redfish_aggregator.hpp
@@ -5,8 +5,7 @@
#include "error_messages.hpp"
#include "http_client.hpp"
#include "http_connection.hpp"
-
-#include <boost/algorithm/string/predicate.hpp>
+#include "parsing.hpp"
#include <array>
#include <ranges>
@@ -154,8 +153,12 @@ inline bool searchCollectionsArray(std::string_view uri,
// defined in the above array.
inline bool isPropertyUri(std::string_view propertyName)
{
- return boost::iends_with(propertyName, "uri") ||
- std::binary_search(nonUriProperties.begin(), nonUriProperties.end(),
+ if (propertyName.ends_with("uri") || propertyName.ends_with("Uri") ||
+ propertyName.ends_with("URI"))
+ {
+ return true;
+ }
+ return std::binary_search(nonUriProperties.begin(), nonUriProperties.end(),
propertyName);
}
@@ -870,9 +873,7 @@ class RedfishAggregator
// We want to attempt prefix fixing regardless of response code
// The resp will not have a json component
// We need to create a json from resp's stringResponse
- std::string_view contentType = resp.getHeaderValue("Content-Type");
- if (boost::iequals(contentType, "application/json") ||
- boost::iequals(contentType, "application/json; charset=utf-8"))
+ if (isJsonContentType(resp.getHeaderValue("Content-Type")))
{
nlohmann::json jsonVal = nlohmann::json::parse(*resp.body(),
nullptr, false);
@@ -934,9 +935,7 @@ class RedfishAggregator
// The resp will not have a json component
// We need to create a json from resp's stringResponse
- std::string_view contentType = resp.getHeaderValue("Content-Type");
- if (boost::iequals(contentType, "application/json") ||
- boost::iequals(contentType, "application/json; charset=utf-8"))
+ if (isJsonContentType(resp.getHeaderValue("Content-Type")))
{
nlohmann::json jsonVal = nlohmann::json::parse(*resp.body(),
nullptr, false);
@@ -1068,9 +1067,7 @@ class RedfishAggregator
// The resp will not have a json component
// We need to create a json from resp's stringResponse
- std::string_view contentType = resp.getHeaderValue("Content-Type");
- if (boost::iequals(contentType, "application/json") ||
- boost::iequals(contentType, "application/json; charset=utf-8"))
+ if (isJsonContentType(resp.getHeaderValue("Content-Type")))
{
bool addedLinks = false;
nlohmann::json jsonVal = nlohmann::json::parse(*resp.body(),