summaryrefslogtreecommitdiff
path: root/redfish-core/src
diff options
context:
space:
mode:
authorDivya Jyoti <divya1.jyoti@intel.com>2023-08-21 11:04:02 +0300
committerEd Tanous <ed@tanous.net>2023-08-30 21:35:46 +0300
commit99bf026224d6ea60be27bd36793ddfaea5537d2a (patch)
tree7b1cd821226d98866013762e3f5f4ab75889af51 /redfish-core/src
parentb2254ccd4584285eb2a16fd1906c54d7c9bf0867 (diff)
downloadbmcweb-99bf026224d6ea60be27bd36793ddfaea5537d2a.tar.xz
Fix incorrect response code for header size limit
In this commit the response code for the exceeding header size limit during event subscription(post request to /redfish/v1/EventService/Subscriptions) is changed to 400 (Bad Request) instead of 405 (Method not allowed) Tested: If header size in post body is large(>8096), then response code is returned as 400 Change-Id: Ie1301777c994dff64a49e625d7f4f7de72010610 Signed-off-by: Divya Jyoti <divya1.jyoti@intel.com>
Diffstat (limited to 'redfish-core/src')
-rw-r--r--redfish-core/src/error_messages.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
index 38f10c824d..7bbd877409 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -1816,7 +1816,7 @@ nlohmann::json arraySizeTooLong(std::string_view property, uint64_t length)
void arraySizeTooLong(crow::Response& res, std::string_view property,
uint64_t length)
{
- res.result(boost::beast::http::status::method_not_allowed);
+ res.result(boost::beast::http::status::bad_request);
addMessageToErrorJson(res.jsonValue, arraySizeTooLong(property, length));
}