diff options
author | Ed Tanous <ed@tanous.net> | 2024-01-03 00:16:50 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2024-01-09 20:44:00 +0300 |
commit | 8ece0e457ee994e54c23ee7393fbce831d81a954 (patch) | |
tree | d673c8d7c744c2057a7250e4027e82249480c2fe /http/complete_response_fields.hpp | |
parent | f3cb5df94799e94df37f9e2e6c2fcc473e0cae4a (diff) | |
download | bmcweb-8ece0e457ee994e54c23ee7393fbce831d81a954.tar.xz |
Fix spelling mistakes
These were found with:
codespell -w $(git ls-files | grep "\.[hc]\(pp\)\?$")
At some point in the future, we might want to get this enabled in CI.
Change-Id: Iccb57b2adfd06a2e177e99db2923fe4e8e329118
Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'http/complete_response_fields.hpp')
-rw-r--r-- | http/complete_response_fields.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/http/complete_response_fields.hpp b/http/complete_response_fields.hpp index a5b3eec3d0..8323dcaa3d 100644 --- a/http/complete_response_fields.hpp +++ b/http/complete_response_fields.hpp @@ -32,14 +32,14 @@ inline void completeResponseFields(const Request& req, Response& res) using http_helpers::ContentType; std::array<ContentType, 3> allowed{ContentType::CBOR, ContentType::JSON, ContentType::HTML}; - ContentType prefered = - getPreferedContentType(req.getHeaderValue("Accept"), allowed); + ContentType preferred = + getPreferredContentType(req.getHeaderValue("Accept"), allowed); - if (prefered == ContentType::HTML) + if (preferred == ContentType::HTML) { json_html_util::prettyPrintJson(res); } - else if (prefered == ContentType::CBOR) + else if (preferred == ContentType::CBOR) { res.addHeader(boost::beast::http::field::content_type, "application/cbor"); @@ -49,7 +49,7 @@ inline void completeResponseFields(const Request& req, Response& res) } else { - // Technically prefered could also be NoMatch here, but we'd + // Technically preferred could also be NoMatch here, but we'd // like to default to something rather than return 400 for // backward compatibility. res.addHeader(boost::beast::http::field::content_type, |