summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2023-04-19 20:53:33 +0300
committerMatt Spinler <spinler@us.ibm.com>2023-04-19 20:53:33 +0300
commit72e21377372245b076c151f62a141153ab318bdd (patch)
tree1cacf444b7748af54af2d5d93dfefd080c659262
parent9d192c74ab336adb662312e955ad292e5e48b44e (diff)
downloadbmcweb-72e21377372245b076c151f62a141153ab318bdd.tar.xz
log_services: Fix isContentTypeAllowed checks
The commit https://gerrit.openbmc.org/c/openbmc/bmcweb/+/56694 inadvertently changed the polarity on the if checks using the newly introduced isContentTypeAllowed function which caused 'Bad Request' to be returned when the content type was allowed. Tested: Getting the EventLog and PostCodes attachment would return the data instead of 'Bad Request'. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Iafcdeaba1a0723326347bb2a832b53bbf0aab230
-rw-r--r--redfish-core/lib/log_services.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index f54939798a..5159ae1a31 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -1941,7 +1941,7 @@ inline void requestRoutesDBusEventLogEntryDownload(App& app)
{
return;
}
- if (http_helpers::isContentTypeAllowed(
+ if (!http_helpers::isContentTypeAllowed(
req.getHeaderValue("Accept"),
http_helpers::ContentType::OctetStream, true))
{
@@ -4008,7 +4008,7 @@ inline void requestRoutesPostCodesEntryAdditionalData(App& app)
{
return;
}
- if (http_helpers::isContentTypeAllowed(
+ if (!http_helpers::isContentTypeAllowed(
req.getHeaderValue("Accept"),
http_helpers::ContentType::OctetStream, true))
{