Closed AleksandrParamonov closed 4 months ago
It looks like most http examples have the space, but the redfish spec does not. Seems like we could just accept either. Please put up a patch in Gerrit for that behavior.
Can you please test if https://gerrit.openbmc.org/c/openbmc/bmcweb/+/70112 solves your bug?
The issue is fixed and BIOS requests are no longer rejected.
Reopening, the above review isn't merged yet.
Is this the right place to submit this?
Bug Description
Redfish requests without space separator between application/json; and charset=utf-8 in content-type in header are considered incorrect.. Code inside parsing.hpp (https://github.com/openbmc/bmcweb/blob/master/http/parsing.hpp#L20) only accepts content-type with space separator:
inline bool isJsonContentType(std::string_view contentType) { return bmcweb::asciiIEquals(contentType, "application/json") || bmcweb::asciiIEquals(contentType, "application/json; charset=utf-8"); }
Shoudln't "application/json;charset=utf-8" be valid?Version
Additional Information
I've met warning message "Failed to parse content type on request" during communication with AMI BIOS. AMI BIOS forms without space separator so some requests are considered invalid.