Fix lesser used options
25b54dba775b31021a3a4677eb79e9771bcb97f7 missed several cases where we
had ifndef instead of ifdef. because these weren't the defaults, these
don't show up as failures when testing.
Tested: Redfish service validator passes. Inspection primarily.
Mechanical change.
Change-Id: I3f6915a97eb44d071795aed76476c6bee7e8ed27
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/http/parsing.hpp b/http/parsing.hpp
index cf81353..d596211 100644
--- a/http/parsing.hpp
+++ b/http/parsing.hpp
@@ -32,9 +32,10 @@
req.getHeaderValue(boost::beast::http::field::content_type)))
{
BMCWEB_LOG_WARNING("Failed to parse content type on request");
-#ifndef BMCWEB_INSECURE_IGNORE_CONTENT_TYPE
- return JsonParseResult::BadContentType;
-#endif
+ if constexpr (!BMCWEB_INSECURE_IGNORE_CONTENT_TYPE)
+ {
+ return JsonParseResult::BadContentType;
+ }
}
jsonOut = nlohmann::json::parse(req.body(), nullptr, false);
if (jsonOut.is_discarded())