From 8ece0e457ee994e54c23ee7393fbce831d81a954 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Tue, 2 Jan 2024 13:16:50 -0800 Subject: 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 --- http/complete_response_fields.hpp | 10 +++++----- http/http_client.hpp | 2 +- http/http_connection.hpp | 2 +- http/logging.hpp | 6 +++--- http/server_sent_event.hpp | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'http') 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 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, diff --git a/http/http_client.hpp b/http/http_client.hpp index 4bae31d7de..076d852e90 100644 --- a/http/http_client.hpp +++ b/http/http_client.hpp @@ -696,7 +696,7 @@ class ConnectionPool : public std::enable_shared_from_this if (!requestQueue.empty()) { BMCWEB_LOG_DEBUG( - "{} requests remaining in queue for {}, reusing connnection {}", + "{} requests remaining in queue for {}, reusing connection {}", requestQueue.size(), destIP, connId); setConnProps(*conn); diff --git a/http/http_connection.hpp b/http/http_connection.hpp index 175912d577..7ea0ac6d01 100644 --- a/http/http_connection.hpp +++ b/http/http_connection.hpp @@ -632,7 +632,7 @@ class Connection : if (ec == boost::asio::error::operation_aborted) { - // Canceled wait means the path succeeeded. + // Canceled wait means the path succeeded. return; } if (ec) diff --git a/http/logging.hpp b/http/logging.hpp index 3fdef7e744..781bcfb9b2 100644 --- a/http/logging.hpp +++ b/http/logging.hpp @@ -166,9 +166,9 @@ struct FormatString std::source_location loc; // NOLINTNEXTLINE(google-explicit-constructor) - FormatString(const char* strIn, const std::source_location& locIn = - std::source_location::current()) : - str(strIn), + FormatString(const char* stringIn, const std::source_location& locIn = + std::source_location::current()) : + str(stringIn), loc(locIn) {} }; diff --git a/http/server_sent_event.hpp b/http/server_sent_event.hpp index 773394836f..49002f60db 100644 --- a/http/server_sent_event.hpp +++ b/http/server_sent_event.hpp @@ -97,11 +97,11 @@ class ConnectionImpl : public Connection boost::beast::http::status::ok, 11, BodyType{}); res.set(boost::beast::http::field::content_type, "text/event-stream"); res.body().more = true; - boost::beast::http::response_serializer& ser = + boost::beast::http::response_serializer& serial = serializer.emplace(std::move(res)); boost::beast::http::async_write_header( - adaptor, ser, + adaptor, serial, std::bind_front(&ConnectionImpl::sendSSEHeaderCallback, this, shared_from_this())); } @@ -257,7 +257,7 @@ class ConnectionImpl : public Connection if (ec == boost::asio::error::operation_aborted) { BMCWEB_LOG_DEBUG("operation aborted"); - // Canceled wait means the path succeeeded. + // Canceled wait means the path succeeded. return; } if (ec) -- cgit v1.2.3