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 | |
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')
-rw-r--r-- | http/complete_response_fields.hpp | 10 | ||||
-rw-r--r-- | http/http_client.hpp | 2 | ||||
-rw-r--r-- | http/http_connection.hpp | 2 | ||||
-rw-r--r-- | http/logging.hpp | 6 | ||||
-rw-r--r-- | http/server_sent_event.hpp | 6 |
5 files changed, 13 insertions, 13 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, 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<ConnectionPool> 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<BodyType>& ser = + boost::beast::http::response_serializer<BodyType>& 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) |