summaryrefslogtreecommitdiff
path: root/redfish-core/lib/redfish_sessions.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2021-06-11 02:26:46 +0300
committerEd Tanous <ed@tanous.net>2021-06-11 02:37:13 +0300
commit5cc148afbd1b936a93d1d902798a9420b3b2e465 (patch)
tree09053da50385c41aca3392d3166001a7808a3bf8 /redfish-core/lib/redfish_sessions.hpp
parent0588a3b929b2a88784db2f3dcac04d69260fb585 (diff)
downloadbmcweb-5cc148afbd1b936a93d1d902798a9420b3b2e465.tar.xz
Fix Session delete to return 200
the tests on https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/43984 identified that there are some that actually look at response codes, and expect 200. This would show up as failures that looked like: Test SSL Connection :: This testcase is for testing the SSL connec... | FAIL | Parent suite setup failed: ValueError: The HTTP status code was not valid: status: 204 valid_status_codes: [0]: 200 This commit fixes the behavior change to move back to the old behavior, and causes SessionService Delete to return 200 with a success message. This commit changes this code back to 200, even though 204 is valid and the test should pass for both, 200 with a success message more closely follows Redfish. Tested: Code builds. Expect the above bump to test this behavior directly. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I1d6bbfab867dc757c78f745119cfd9835ebbc505
Diffstat (limited to 'redfish-core/lib/redfish_sessions.hpp')
-rw-r--r--redfish-core/lib/redfish_sessions.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp
index 53ec7d07c3..bb7ad1292b 100644
--- a/redfish-core/lib/redfish_sessions.hpp
+++ b/redfish-core/lib/redfish_sessions.hpp
@@ -101,7 +101,7 @@ inline void requestRoutesSession(App& app)
persistent_data::SessionStore::getInstance().removeSession(
session);
- asyncResp->res.result(boost::beast::http::status::no_content);
+ messages::success(asyncResp->res);
});
BMCWEB_ROUTE(app, "/redfish/v1/SessionService/Sessions/")