summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Change-InsertMedia-action-response-for-POST-in-proxy.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Change-InsertMedia-action-response-for-POST-in-proxy.patch')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Change-InsertMedia-action-response-for-POST-in-proxy.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Change-InsertMedia-action-response-for-POST-in-proxy.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Change-InsertMedia-action-response-for-POST-in-proxy.patch
new file mode 100644
index 000000000..d04220b89
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0002-Change-InsertMedia-action-response-for-POST-in-proxy.patch
@@ -0,0 +1,30 @@
+From dcc94627aac5b8e4ad181c8548391c53d27b8896 Mon Sep 17 00:00:00 2001
+From: Karol Wachowski <karol.wachowski@intel.com>
+Date: Tue, 16 Feb 2021 06:47:11 +0000
+Subject: [PATCH] Change InsertMedia action response for POST in proxy mode
+
+Set boost::beast::http::status::method_not_allowed as a response
+for POST request to Virtual Media Insert Media action to keep
+consistency with other non existing requests.
+---
+ redfish-core/lib/virtual_media.hpp | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
+index 80e7315..76e8c4a 100644
+--- a/redfish-core/lib/virtual_media.hpp
++++ b/redfish-core/lib/virtual_media.hpp
+@@ -611,10 +611,9 @@ class VirtualMediaActionInsertMedia : public Node
+ // Not possible in proxy mode
+ BMCWEB_LOG_DEBUG << "InsertMedia not "
+ "allowed in proxy mode";
+- messages::resourceNotFound(
+- aResp->res, "VirtualMedia.InsertMedia",
+- resName);
+-
++ aResp->res.result(
++ boost::beast::http::status::
++ method_not_allowed);
+ return;
+ }
+