Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Commit 9f7ae07

Browse files
authoredMar 8, 2023
Fix typos (yhirose#1517)
1 parent 1ebb841 commit 9f7ae07

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed
 

‎CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ set(_HTTPLIB_OPENSSL_MIN_VER "1.1.1")
7979
# Allow for a build to require OpenSSL to pass, instead of just being optional
8080
option(HTTPLIB_REQUIRE_OPENSSL "Requires OpenSSL to be found & linked, or fails build." OFF)
8181
option(HTTPLIB_REQUIRE_ZLIB "Requires ZLIB to be found & linked, or fails build." OFF)
82-
# Allow for a build to casually enable OpenSSL/ZLIB support, but silenty continue if not found.
82+
# Allow for a build to casually enable OpenSSL/ZLIB support, but silently continue if not found.
8383
# Make these options so their automatic use can be specifically disabled (as needed)
8484
option(HTTPLIB_USE_OPENSSL_IF_AVAILABLE "Uses OpenSSL (if available) to enable HTTPS support." ON)
8585
option(HTTPLIB_USE_ZLIB_IF_AVAILABLE "Uses ZLIB (if available) to enable Zlib compression support." ON)

‎httplib.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ class Server {
800800
ContentReceiver multipart_receiver);
801801
bool read_content_core(Stream &strm, Request &req, Response &res,
802802
ContentReceiver receiver,
803-
MultipartContentHeader mulitpart_header,
803+
MultipartContentHeader multipart_header,
804804
ContentReceiver multipart_receiver);
805805

806806
virtual bool process_and_close_socket(socket_t sock);
@@ -1150,7 +1150,7 @@ class ClientImpl {
11501150

11511151
void copy_settings(const ClientImpl &rhs);
11521152

1153-
// Socket endoint information
1153+
// Socket endpoint information
11541154
const std::string host_;
11551155
const int port_;
11561156
const std::string host_and_port_;
@@ -5542,7 +5542,7 @@ inline bool Server::read_content_with_content_receiver(
55425542

55435543
inline bool Server::read_content_core(Stream &strm, Request &req, Response &res,
55445544
ContentReceiver receiver,
5545-
MultipartContentHeader mulitpart_header,
5545+
MultipartContentHeader multipart_header,
55465546
ContentReceiver multipart_receiver) {
55475547
detail::MultipartFormDataParser multipart_form_data_parser;
55485548
ContentReceiverWithProgress out;
@@ -5562,14 +5562,14 @@ inline bool Server::read_content_core(Stream &strm, Request &req, Response &res,
55625562
while (pos < n) {
55635563
auto read_size = (std::min)<size_t>(1, n - pos);
55645564
auto ret = multipart_form_data_parser.parse(
5565-
buf + pos, read_size, multipart_receiver, mulitpart_header);
5565+
buf + pos, read_size, multipart_receiver, multipart_header);
55665566
if (!ret) { return false; }
55675567
pos += read_size;
55685568
}
55695569
return true;
55705570
*/
55715571
return multipart_form_data_parser.parse(buf, n, multipart_receiver,
5572-
mulitpart_header);
5572+
multipart_header);
55735573
};
55745574
} else {
55755575
out = [receiver](const char *buf, size_t n, uint64_t /*off*/,
@@ -6512,7 +6512,7 @@ inline bool ClientImpl::write_content_with_provider(Stream &strm,
65126512
auto is_shutting_down = []() { return false; };
65136513

65146514
if (req.is_chunked_content_provider_) {
6515-
// TODO: Brotli suport
6515+
// TODO: Brotli support
65166516
std::unique_ptr<detail::compressor> compressor;
65176517
#ifdef CPPHTTPLIB_ZLIB_SUPPORT
65186518
if (compress_) {
@@ -7399,7 +7399,7 @@ inline void ClientImpl::stop() {
73997399
return;
74007400
}
74017401

7402-
// Otherwise, sitll holding the mutex, we can shut everything down ourselves
7402+
// Otherwise, still holding the mutex, we can shut everything down ourselves
74037403
shutdown_ssl(socket_, true);
74047404
shutdown_socket(socket_);
74057405
close_socket(socket_);
@@ -8142,7 +8142,7 @@ SSLClient::verify_host_with_subject_alt_name(X509 *server_cert) const {
81428142

81438143
if (alt_names) {
81448144
auto dsn_matched = false;
8145-
auto ip_mached = false;
8145+
auto ip_matched = false;
81468146

81478147
auto count = sk_GENERAL_NAME_num(alt_names);
81488148

@@ -8158,14 +8158,14 @@ SSLClient::verify_host_with_subject_alt_name(X509 *server_cert) const {
81588158
case GEN_IPADD:
81598159
if (!memcmp(&addr6, name, addr_len) ||
81608160
!memcmp(&addr, name, addr_len)) {
8161-
ip_mached = true;
8161+
ip_matched = true;
81628162
}
81638163
break;
81648164
}
81658165
}
81668166
}
81678167

8168-
if (dsn_matched || ip_mached) { ret = true; }
8168+
if (dsn_matched || ip_matched) { ret = true; }
81698169
}
81708170

81718171
GENERAL_NAMES_free((STACK_OF(GENERAL_NAME) *)alt_names);

‎httplibConfig.cmake.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ if(NOT DEFINED httplib_FOUND OR httplib_FOUND)
5454
include("${CMAKE_CURRENT_LIST_DIR}/httplibTargets.cmake")
5555
endif()
5656

57-
# Ouputs a "found httplib /usr/include/httplib.h" message when using find_package(httplib)
57+
# Outputs a "found httplib /usr/include/httplib.h" message when using find_package(httplib)
5858
include(FindPackageMessage)
5959
if(TARGET httplib::httplib)
6060
set(HTTPLIB_FOUND TRUE)

‎test/fuzzing/standalone_fuzz_target_runner.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <vector>
1212

1313
// Forward declare the "fuzz target" interface.
14-
// We deliberately keep this inteface simple and header-free.
14+
// We deliberately keep this interface simple and header-free.
1515
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
1616

1717
// It reads all files passed as parameters and feeds their contents

‎test/test.cc

+9-9
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ MultipartFormData &get_file_value(MultipartFormDataItems &files,
4646
return *it;
4747
#else
4848
if (it != files.end()) { return *it; }
49-
throw std::runtime_error("invalid mulitpart form data name error");
49+
throw std::runtime_error("invalid multipart form data name error");
5050
#endif
5151
}
5252

@@ -779,7 +779,7 @@ TEST(DigestAuthTest, FromHTTPWatch_Online) {
779779
}
780780

781781
// NOTE: Until httpbin.org fixes issue #46, the following test is commented
782-
// out. Plese see https://httpbin.org/digest-auth/auth/hello/world
782+
// out. Please see https://httpbin.org/digest-auth/auth/hello/world
783783
// cli.set_digest_auth("bad", "world");
784784
// for (auto path : paths) {
785785
// auto res = cli.Get(path.c_str());
@@ -1778,7 +1778,7 @@ class ServerTest : public ::testing::Test {
17781778
EXPECT_EQ(text_value.size(), 1);
17791779
auto &text = text_value[0];
17801780
EXPECT_TRUE(text.filename.empty());
1781-
EXPECT_EQ("defalut text", text.content);
1781+
EXPECT_EQ("default text", text.content);
17821782
}
17831783
{
17841784
const auto &text1_values = req.get_file_values("multi_text1");
@@ -2647,7 +2647,7 @@ TEST_F(ServerTest, MultipartFormData) {
26472647

26482648
TEST_F(ServerTest, MultipartFormDataMultiFileValues) {
26492649
MultipartFormDataItems items = {
2650-
{"text", "defalut text", "", ""},
2650+
{"text", "default text", "", ""},
26512651

26522652
{"multi_text1", "aaaaa", "", ""},
26532653
{"multi_text1", "bbbbb", "", ""},
@@ -3185,7 +3185,7 @@ TEST(GzipDecompressor, ChunkedDecompression) {
31853185
{
31863186
httplib::detail::gzip_decompressor decompressor;
31873187

3188-
// Chunk size is chosen specificaly to have a decompressed chunk size equal
3188+
// Chunk size is chosen specifically to have a decompressed chunk size equal
31893189
// to 16384 bytes 16384 bytes is the size of decompressor output buffer
31903190
size_t chunk_size = 130;
31913191
for (size_t chunk_begin = 0; chunk_begin < compressed_data.size();
@@ -3334,7 +3334,7 @@ TEST_F(ServerTest, PostContentReceiver) {
33343334
ASSERT_EQ("content", res->body);
33353335
}
33363336

3337-
TEST_F(ServerTest, PostMulitpartFilsContentReceiver) {
3337+
TEST_F(ServerTest, PostMultipartFileContentReceiver) {
33383338
MultipartFormDataItems items = {
33393339
{"text1", "text default", "", ""},
33403340
{"text2", "aωb", "", ""},
@@ -3349,7 +3349,7 @@ TEST_F(ServerTest, PostMulitpartFilsContentReceiver) {
33493349
EXPECT_EQ(200, res->status);
33503350
}
33513351

3352-
TEST_F(ServerTest, PostMulitpartPlusBoundary) {
3352+
TEST_F(ServerTest, PostMultipartPlusBoundary) {
33533353
MultipartFormDataItems items = {
33543354
{"text1", "text default", "", ""},
33553355
{"text2", "aωb", "", ""},
@@ -3765,10 +3765,10 @@ TEST(ServerRequestParsingTest, ReadHeadersRegexComplexity2) {
37653765
"&&&%%%");
37663766
}
37673767

3768-
TEST(ServerRequestParsingTest, ExcessiveWhitespaceInUnparseableHeaderLine) {
3768+
TEST(ServerRequestParsingTest, ExcessiveWhitespaceInUnparsableHeaderLine) {
37693769
// Make sure this doesn't crash the server.
37703770
// In a previous version of the header line regex, the "\r" rendered the line
3771-
// unparseable and the regex engine repeatedly backtracked, trying to look for
3771+
// unparsable and the regex engine repeatedly backtracked, trying to look for
37723772
// a new position where the leading white space ended and the field value
37733773
// began.
37743774
// The crash occurs with libc++ but not libstdc++.

‎test/test_proxy.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ void DigestAuthTestFromHTTPWatch(T& cli) {
193193
}
194194

195195
// NOTE: Until httpbin.org fixes issue #46, the following test is commented
196-
// out. Plese see https://httpbin.org/digest-auth/auth/hello/world
196+
// out. Please see https://httpbin.org/digest-auth/auth/hello/world
197197
// cli.set_digest_auth("bad", "world");
198198
// for (auto path : paths) {
199199
// auto res = cli.Get(path.c_str());

0 commit comments

Comments
 (0)
This repository has been archived.