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>
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
index 38f10c8..7bbd877 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -1816,7 +1816,7 @@
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));
}