diff --git a/CMakeLists.txt b/CMakeLists.txt
index a4587d81..e7f2a5a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -179,7 +179,7 @@ endif()
# case "$host" in
# *android*)
# android_build=yes
-# # android does not need -pthread, but needs followng 3 libs for C++
+# # android does not need -pthread, but needs following 3 libs for C++
# APPLDFLAGS="$APPLDFLAGS -lstdc++ -latomic -lsupc++"
# dl: openssl requires libdl when it is statically linked.
diff --git a/Makefile.am b/Makefile.am
index 79174a5a..a5bb7a36 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,7 +55,7 @@ EXTRA_DIST = nghttpx.conf.sample proxy.pac.sample android-config android-make \
.PHONY: clang-format
# Format source files using clang-format. Don't format source files
-# under third-party directory since we are not responsible for thier
+# under third-party directory since we are not responsible for their
# coding style.
clang-format:
CLANGFORMAT=`git config --get clangformat.binary`; \
diff --git a/configure.ac b/configure.ac
index 91146331..fd2b0a8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -349,7 +349,7 @@ APPLDFLAGS=
case "$host_os" in
*android*)
android_build=yes
- # android does not need -pthread, but needs followng 3 libs for C++
+ # android does not need -pthread, but needs following 3 libs for C++
APPLDFLAGS="$APPLDFLAGS -lstdc++ -latomic -lsupc++"
;;
*)
diff --git a/doc/_exts/rubydomain/rubydomain.py b/doc/_exts/rubydomain/rubydomain.py
index 62a04285..db352334 100644
--- a/doc/_exts/rubydomain/rubydomain.py
+++ b/doc/_exts/rubydomain/rubydomain.py
@@ -493,7 +493,7 @@ class RubyModuleIndex(Index):
# list of all modules, sorted by module name
modules = sorted(_iteritems(self.domain.data['modules']),
key=lambda x: x[0].lower())
- # sort out collapsable modules
+ # sort out collapsible modules
prev_modname = ''
num_toplevels = 0
for modname, (docname, synopsis, platforms, deprecated) in modules:
diff --git a/doc/_themes/sphinx_rtd_theme/footer.html b/doc/_themes/sphinx_rtd_theme/footer.html
index e1b99c5a..0b48afed 100644
--- a/doc/_themes/sphinx_rtd_theme/footer.html
+++ b/doc/_themes/sphinx_rtd_theme/footer.html
@@ -51,7 +51,7 @@
{% set readthedocs_web = 'Read the Docs' %}
{# Translators: the variable "sphinx_web" is a link to the Sphinx project documentation with the text "Sphinx" #}
{% trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %}
- {# Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documenation #}
+ {# Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documentation #}
{% trans %}theme{% endtrans %}
{# Translators: this is always used as "provided by Read the Docs", and should not imply Read the Docs is an author of the generated documentation. #}
{% trans %}provided by {{ readthedocs_web }}{% endtrans %}.
diff --git a/doc/_themes/sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.po b/doc/_themes/sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.po
index cbf7e9a7..1fa1553d 100644
--- a/doc/_themes/sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.po
+++ b/doc/_themes/sphinx_rtd_theme/locale/en/LC_MESSAGES/sphinx.po
@@ -71,7 +71,7 @@ msgid "Built with %(sphinx_web)s using a"
msgstr ""
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
-#. generated documenation
+#. generated documentation
#: sphinx_rtd_theme/footer.html:54
msgid "theme"
msgstr ""
diff --git a/doc/_themes/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po b/doc/_themes/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po
index 0b69d141..92d98588 100644
--- a/doc/_themes/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po
+++ b/doc/_themes/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po
@@ -76,7 +76,7 @@ msgid "Built with %(sphinx_web)s using a"
msgstr "Construido con %(sphinx_web)s usando un"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
-#. generated documenation
+#. generated documentation
#: sphinx_rtd_theme/footer.html:54
msgid "theme"
msgstr "tema"
diff --git a/doc/_themes/sphinx_rtd_theme/locale/et/LC_MESSAGES/sphinx.po b/doc/_themes/sphinx_rtd_theme/locale/et/LC_MESSAGES/sphinx.po
index e2217542..c7eacd03 100644
--- a/doc/_themes/sphinx_rtd_theme/locale/et/LC_MESSAGES/sphinx.po
+++ b/doc/_themes/sphinx_rtd_theme/locale/et/LC_MESSAGES/sphinx.po
@@ -76,7 +76,7 @@ msgid "Built with %(sphinx_web)s using a"
msgstr "Ehitatud %(sphinx_web)s'iga,"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
-#. generated documenation
+#. generated documentation
#: sphinx_rtd_theme/footer.html:54
msgid "theme"
msgstr "kujundusteema"
diff --git a/doc/_themes/sphinx_rtd_theme/locale/nl/LC_MESSAGES/sphinx.po b/doc/_themes/sphinx_rtd_theme/locale/nl/LC_MESSAGES/sphinx.po
index 7963c027..a19b79ed 100644
--- a/doc/_themes/sphinx_rtd_theme/locale/nl/LC_MESSAGES/sphinx.po
+++ b/doc/_themes/sphinx_rtd_theme/locale/nl/LC_MESSAGES/sphinx.po
@@ -75,7 +75,7 @@ msgid "Built with %(sphinx_web)s using a"
msgstr "Gebouwd met %(sphinx_web)s met een"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
-#. generated documenation
+#. generated documentation
#: sphinx_rtd_theme/footer.html:54
msgid "theme"
msgstr "thema"
diff --git a/doc/_themes/sphinx_rtd_theme/locale/pt_BR/LC_MESSAGES/sphinx.po b/doc/_themes/sphinx_rtd_theme/locale/pt_BR/LC_MESSAGES/sphinx.po
index 8b5e7607..911a0b25 100644
--- a/doc/_themes/sphinx_rtd_theme/locale/pt_BR/LC_MESSAGES/sphinx.po
+++ b/doc/_themes/sphinx_rtd_theme/locale/pt_BR/LC_MESSAGES/sphinx.po
@@ -75,7 +75,7 @@ msgid "Built with %(sphinx_web)s using a"
msgstr "Compilado com %(sphinx_web)s usando um"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
-#. generated documenation
+#. generated documentation
#: sphinx_rtd_theme/footer.html:54
msgid "theme"
msgstr "tema"
diff --git a/doc/_themes/sphinx_rtd_theme/locale/ru/LC_MESSAGES/sphinx.po b/doc/_themes/sphinx_rtd_theme/locale/ru/LC_MESSAGES/sphinx.po
index 1648d8d1..dae6966a 100644
--- a/doc/_themes/sphinx_rtd_theme/locale/ru/LC_MESSAGES/sphinx.po
+++ b/doc/_themes/sphinx_rtd_theme/locale/ru/LC_MESSAGES/sphinx.po
@@ -76,7 +76,7 @@ msgid "Built with %(sphinx_web)s using a"
msgstr "Собрано при помощи %(sphinx_web)s с использованием"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
-#. generated documenation
+#. generated documentation
#: sphinx_rtd_theme/footer.html:54
msgid "theme"
msgstr "темы,"
diff --git a/doc/_themes/sphinx_rtd_theme/locale/sphinx.pot b/doc/_themes/sphinx_rtd_theme/locale/sphinx.pot
index ab183f81..6b9de399 100644
--- a/doc/_themes/sphinx_rtd_theme/locale/sphinx.pot
+++ b/doc/_themes/sphinx_rtd_theme/locale/sphinx.pot
@@ -70,7 +70,7 @@ msgid "Built with %(sphinx_web)s using a"
msgstr ""
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
-#. generated documenation
+#. generated documentation
#: sphinx_rtd_theme/footer.html:54
msgid "theme"
msgstr ""
diff --git a/doc/_themes/sphinx_rtd_theme/locale/sv/LC_MESSAGES/sphinx.po b/doc/_themes/sphinx_rtd_theme/locale/sv/LC_MESSAGES/sphinx.po
index e9d80b05..42d6ca15 100644
--- a/doc/_themes/sphinx_rtd_theme/locale/sv/LC_MESSAGES/sphinx.po
+++ b/doc/_themes/sphinx_rtd_theme/locale/sv/LC_MESSAGES/sphinx.po
@@ -75,7 +75,7 @@ msgid "Built with %(sphinx_web)s using a"
msgstr "Gjord med %(sphinx_web)s med hjälp av"
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
-#. generated documenation
+#. generated documentation
#: sphinx_rtd_theme/footer.html:54
msgid "theme"
msgstr "tema"
diff --git a/doc/_themes/sphinx_rtd_theme/locale/tr/LC_MESSAGES/sphinx.po b/doc/_themes/sphinx_rtd_theme/locale/tr/LC_MESSAGES/sphinx.po
index 4f75e068..40504682 100644
--- a/doc/_themes/sphinx_rtd_theme/locale/tr/LC_MESSAGES/sphinx.po
+++ b/doc/_themes/sphinx_rtd_theme/locale/tr/LC_MESSAGES/sphinx.po
@@ -67,7 +67,7 @@ msgid "Last updated on %(last_updated)s."
msgstr "Son olarak %(last_updated)s tarihinde güncellendi."
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
-#. generated documenation
+#. generated documentation
#: sphinx_rtd_theme/footer.html:54
msgid "theme"
msgstr "tema"
diff --git a/doc/_themes/sphinx_rtd_theme/locale/zh_CN/LC_MESSAGES/sphinx.po b/doc/_themes/sphinx_rtd_theme/locale/zh_CN/LC_MESSAGES/sphinx.po
index f30abb64..51a7145c 100644
--- a/doc/_themes/sphinx_rtd_theme/locale/zh_CN/LC_MESSAGES/sphinx.po
+++ b/doc/_themes/sphinx_rtd_theme/locale/zh_CN/LC_MESSAGES/sphinx.po
@@ -71,7 +71,7 @@ msgid "Built with %(sphinx_web)s using a"
msgstr "利用 %(sphinx_web)s 构建,使用了 "
#. "theme" refers to a theme for Sphinx, which alters the appearance of the
-#. generated documenation
+#. generated documentation
#: sphinx_rtd_theme/footer.html:54
msgid "theme"
msgstr "主题"
diff --git a/doc/h2load.1 b/doc/h2load.1
index 2b6c2e59..e59c161e 100644
--- a/doc/h2load.1
+++ b/doc/h2load.1
@@ -121,7 +121,7 @@ Add/Override a header to the requests.
.INDENT 0.0
.TP
.B \-\-ciphers=
-Set allowed cipher list for TLSv1.2 or ealier. The
+Set allowed cipher list for TLSv1.2 or earlier. The
format of the string is described in OpenSSL ciphers(1).
.sp
Default: \fBECDHE\-ECDSA\-AES256\-GCM\-SHA384:ECDHE\-RSA\-AES256\-GCM\-SHA384:ECDHE\-ECDSA\-CHACHA20\-POLY1305:ECDHE\-RSA\-CHACHA20\-POLY1305:ECDHE\-ECDSA\-AES128\-GCM\-SHA256:ECDHE\-RSA\-AES128\-GCM\-SHA256:ECDHE\-ECDSA\-AES256\-SHA384:ECDHE\-RSA\-AES256\-SHA384:ECDHE\-ECDSA\-AES128\-SHA256:ECDHE\-RSA\-AES128\-SHA256\fP
diff --git a/doc/h2load.1.rst b/doc/h2load.1.rst
index 66173807..4c0ae96a 100644
--- a/doc/h2load.1.rst
+++ b/doc/h2load.1.rst
@@ -93,7 +93,7 @@ OPTIONS
.. option:: --ciphers=
- Set allowed cipher list for TLSv1.2 or ealier. The
+ Set allowed cipher list for TLSv1.2 or earlier. The
format of the string is described in OpenSSL ciphers(1).
Default: ``ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256``
diff --git a/integration-tests/nghttpx_http1_test.go b/integration-tests/nghttpx_http1_test.go
index 9eb80e60..7159b462 100644
--- a/integration-tests/nghttpx_http1_test.go
+++ b/integration-tests/nghttpx_http1_test.go
@@ -5,14 +5,15 @@ import (
"bytes"
"encoding/json"
"fmt"
- "golang.org/x/net/http2/hpack"
- "golang.org/x/net/websocket"
"io"
"net/http"
"regexp"
"syscall"
"testing"
"time"
+
+ "golang.org/x/net/http2/hpack"
+ "golang.org/x/net/websocket"
)
// TestH1H1PlainGET tests whether simple HTTP/1 GET request works.
@@ -34,7 +35,7 @@ func TestH1H1PlainGET(t *testing.T) {
}
// TestH1H1PlainGETClose tests whether simple HTTP/1 GET request with
-// Connetion: close request header field works.
+// Connection: close request header field works.
func TestH1H1PlainGETClose(t *testing.T) {
st := newServerTester(nil, t, noopHandler)
defer st.Close()
diff --git a/lib/nghttp2_buf.h b/lib/nghttp2_buf.h
index 06cce67a..45f62f16 100644
--- a/lib/nghttp2_buf.h
+++ b/lib/nghttp2_buf.h
@@ -99,7 +99,7 @@ void nghttp2_buf_free(nghttp2_buf *buf, nghttp2_mem *mem);
* |new_cap|. If extensions took place, buffer pointers in |buf| will
* change.
*
- * This function returns 0 if it succeeds, or one of the followings
+ * This function returns 0 if it succeeds, or one of the following
* negative error codes:
*
* NGHTTP2_ERR_NOMEM
diff --git a/lib/nghttp2_frame.h b/lib/nghttp2_frame.h
index 4b9222ac..3859926e 100644
--- a/lib/nghttp2_frame.h
+++ b/lib/nghttp2_frame.h
@@ -46,7 +46,7 @@
#define NGHTTP2_MAX_FRAME_SIZE_MIN (1 << 14)
#define NGHTTP2_MAX_PAYLOADLEN 16384
-/* The one frame buffer length for tranmission. We may use several of
+/* The one frame buffer length for transmission. We may use several of
them to support CONTINUATION. To account for Pad Length field, we
allocate extra 1 byte, which saves extra large memcopying. */
#define NGHTTP2_FRAMEBUF_CHUNKLEN \
diff --git a/lib/nghttp2_net.h b/lib/nghttp2_net.h
index 95ffee74..582099b9 100644
--- a/lib/nghttp2_net.h
+++ b/lib/nghttp2_net.h
@@ -42,7 +42,7 @@
#if defined(WIN32)
/* Windows requires ws2_32 library for ntonl family functions. We
define inline functions for those function so that we don't have
- dependeny on that lib. */
+ dependency on that lib. */
# ifdef _MSC_VER
# define STIN static __inline
diff --git a/lib/nghttp2_outbound_item.h b/lib/nghttp2_outbound_item.h
index b5f503a3..bd4611b5 100644
--- a/lib/nghttp2_outbound_item.h
+++ b/lib/nghttp2_outbound_item.h
@@ -111,7 +111,7 @@ struct nghttp2_outbound_item {
to this structure to avoid frequent memory allocation. */
nghttp2_ext_frame_payload ext_frame_payload;
nghttp2_aux_data aux_data;
- /* The priority used in priority comparion. Smaller is served
+ /* The priority used in priority comparison. Smaller is served
earlier. For PING, SETTINGS and non-DATA frames (excluding
response HEADERS frame) have dedicated cycle value defined above.
For DATA frame, cycle is computed by taking into account of
diff --git a/lib/nghttp2_pq.h b/lib/nghttp2_pq.h
index 2d7b702a..7b7b7392 100644
--- a/lib/nghttp2_pq.h
+++ b/lib/nghttp2_pq.h
@@ -114,7 +114,7 @@ typedef int (*nghttp2_pq_item_cb)(nghttp2_pq_entry *item, void *arg);
void nghttp2_pq_update(nghttp2_pq *pq, nghttp2_pq_item_cb fun, void *arg);
/*
- * Applys |fun| to each item in |pq|. The |arg| is passed as arg
+ * Applies |fun| to each item in |pq|. The |arg| is passed as arg
* parameter to callback function. This function must not change the
* ordering key. If the return value from callback is nonzero, this
* function returns 1 immediately without iterating remaining items.
diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c
index 36f1179f..380a47c1 100644
--- a/lib/nghttp2_session.c
+++ b/lib/nghttp2_session.c
@@ -5341,7 +5341,7 @@ static ssize_t inbound_frame_compute_pad(nghttp2_inbound_frame *iframe) {
/*
* This function returns the effective payload length in the data of
- * length |readlen| when the remaning payload is |payloadleft|. The
+ * length |readlen| when the remaining payload is |payloadleft|. The
* |payloadleft| does not include |readlen|. If padding was started
* strictly before this data chunk, this function returns -1.
*/
diff --git a/lib/nghttp2_session.h b/lib/nghttp2_session.h
index 07bfbb6c..907b1704 100644
--- a/lib/nghttp2_session.h
+++ b/lib/nghttp2_session.h
@@ -408,7 +408,7 @@ int nghttp2_session_add_rst_stream(nghttp2_session *session, int32_t stream_id,
uint32_t error_code);
/*
- * Adds PING frame. This is a convenient functin built on top of
+ * Adds PING frame. This is a convenient function built on top of
* nghttp2_session_add_frame() to add PING easily.
*
* If the |opaque_data| is not NULL, it must point to 8 bytes memory
diff --git a/lib/nghttp2_stream.c b/lib/nghttp2_stream.c
index 96e1d9fe..f4c80a24 100644
--- a/lib/nghttp2_stream.c
+++ b/lib/nghttp2_stream.c
@@ -33,7 +33,7 @@
#include "nghttp2_frame.h"
/* Maximum distance between any two stream's cycle in the same
- prirority queue. Imagine stream A's cycle is A, and stream B's
+ priority queue. Imagine stream A's cycle is A, and stream B's
cycle is B, and A < B. The cycle is unsigned 32 bit integer, it
may get overflow. Because of how we calculate the next cycle
value, if B - A is less than or equals to
diff --git a/python/nghttp2.pyx b/python/nghttp2.pyx
index 81f3f3ee..953a6481 100644
--- a/python/nghttp2.pyx
+++ b/python/nghttp2.pyx
@@ -701,7 +701,7 @@ cdef class _HTTP2SessionCoreBase:
if outbuflen == 0:
break
if outbuflen < 0:
- raise Exception('nghttp2_session_mem_send faild: {}'.format\
+ raise Exception('nghttp2_session_mem_send failed: {}'.format\
(_strerror(outbuflen)))
self.transport.write(outbuf[:outbuflen])
@@ -1083,7 +1083,7 @@ if asyncio:
address.
client_certificate
- May contain the client certifcate in its non-binary form
+ May contain the client certificate in its non-binary form
stream_id
Stream ID of this stream
diff --git a/src/h2load.cc b/src/h2load.cc
index 3fa09ab1..32cd5add 100644
--- a/src/h2load.cc
+++ b/src/h2load.cc
@@ -2128,7 +2128,7 @@ Options:
-H, --header=
Add/Override a header to the requests.
--ciphers=
- Set allowed cipher list for TLSv1.2 or ealier. The
+ Set allowed cipher list for TLSv1.2 or earlier. The
format of the string is described in OpenSSL ciphers(1).
Default: )"
<< config.ciphers << R"(
diff --git a/src/http2_test.cc b/src/http2_test.cc
index b998ee71..2d1ab43b 100644
--- a/src/http2_test.cc
+++ b/src/http2_test.cc
@@ -916,7 +916,7 @@ void test_http2_rewrite_clean_path(void) {
CU_ASSERT("/delta%3A" == http2::rewrite_clean_path(
balloc, StringRef::from_lit("/delta%3a")));
- // path component is normalized before mathcing
+ // path component is normalized before matching
CU_ASSERT(
"/alpha/bravo/" ==
http2::rewrite_clean_path(
diff --git a/src/shrpx_api_downstream_connection.cc b/src/shrpx_api_downstream_connection.cc
index 063eed70..254ab59e 100644
--- a/src/shrpx_api_downstream_connection.cc
+++ b/src/shrpx_api_downstream_connection.cc
@@ -463,7 +463,7 @@ int APIDownstreamConnection::on_read() { return 0; }
int APIDownstreamConnection::on_write() { return 0; }
-void APIDownstreamConnection::on_upstream_change(Upstream *uptream) {}
+void APIDownstreamConnection::on_upstream_change(Upstream *upstream) {}
bool APIDownstreamConnection::poolable() const { return false; }
diff --git a/src/shrpx_api_downstream_connection.h b/src/shrpx_api_downstream_connection.h
index af6b95eb..5d4182f0 100644
--- a/src/shrpx_api_downstream_connection.h
+++ b/src/shrpx_api_downstream_connection.h
@@ -81,7 +81,7 @@ public:
virtual int on_read();
virtual int on_write();
- virtual void on_upstream_change(Upstream *uptream);
+ virtual void on_upstream_change(Upstream *upstream);
// true if this object is poolable.
virtual bool poolable() const;
diff --git a/src/shrpx_config.cc b/src/shrpx_config.cc
index b8acbe50..e158ba6d 100644
--- a/src/shrpx_config.cc
+++ b/src/shrpx_config.cc
@@ -4463,7 +4463,7 @@ int configure_downstream_group(Config *config, bool http2_proxy,
if (!g.mruby_file.empty()) {
if (mruby::create_mruby_context(g.mruby_file) == nullptr) {
LOG(config->ignore_per_pattern_mruby_error ? ERROR : FATAL)
- << "backend: Could not compile mruby flie for pattern "
+ << "backend: Could not compile mruby file for pattern "
<< g.pattern;
if (!config->ignore_per_pattern_mruby_error) {
return -1;
diff --git a/src/shrpx_config.h b/src/shrpx_config.h
index d88ac7a9..b5871fff 100644
--- a/src/shrpx_config.h
+++ b/src/shrpx_config.h
@@ -691,7 +691,7 @@ struct TLSConfig {
ev_tstamp idle_timeout;
} dyn_rec;
- // OCSP realted configurations
+ // OCSP related configurations
struct {
ev_tstamp update_interval;
StringRef fetch_ocsp_response_file;
diff --git a/src/shrpx_connection.cc b/src/shrpx_connection.cc
index af3cc05a..b4211adc 100644
--- a/src/shrpx_connection.cc
+++ b/src/shrpx_connection.cc
@@ -753,7 +753,7 @@ ssize_t Connection::write_tls(const void *data, size_t len) {
// length) on SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE.
// get_write_limit() may return smaller length than previously
// passed to SSL_write, which violates OpenSSL assumption. To avoid
- // this, we keep last legnth passed to SSL_write to
+ // this, we keep last length passed to SSL_write to
// tls.last_writelen if SSL_write indicated I/O blocking.
if (tls.last_writelen == 0) {
len = std::min(len, wlimit.avail());
@@ -831,7 +831,7 @@ ssize_t Connection::read_tls(void *data, size_t len) {
// length) on SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE.
// rlimit_.avail() or rlimit_.avail() may return different length
// than the length previously passed to SSL_read, which violates
- // OpenSSL assumption. To avoid this, we keep last legnth passed
+ // OpenSSL assumption. To avoid this, we keep last length passed
// to SSL_read to tls_last_readlen_ if SSL_read indicated I/O
// blocking.
if (tls.last_readlen == 0) {
diff --git a/src/shrpx_connection_handler.h b/src/shrpx_connection_handler.h
index 8a515e4b..e89b6d52 100644
--- a/src/shrpx_connection_handler.h
+++ b/src/shrpx_connection_handler.h
@@ -163,7 +163,7 @@ public:
// Cancels ocsp update process
void cancel_ocsp_update();
- // Starts ocsp update for certficate |cert_file|.
+ // Starts ocsp update for certificate |cert_file|.
int start_ocsp_update(const char *cert_file);
// Reads incoming data from ocsp update process
void read_ocsp_chunk();
diff --git a/src/shrpx_dns_resolver.h b/src/shrpx_dns_resolver.h
index 696c5430..e622f996 100644
--- a/src/shrpx_dns_resolver.h
+++ b/src/shrpx_dns_resolver.h
@@ -88,7 +88,7 @@ public:
int on_write(int fd);
int on_timeout();
// Calls this function when DNS query finished.
- void on_result(int staus, hostent *hostent);
+ void on_result(int status, hostent *hostent);
void reset_timeout();
void start_rev(int fd);
diff --git a/src/shrpx_downstream_connection.h b/src/shrpx_downstream_connection.h
index 12bbbc5b..8efdcbef 100644
--- a/src/shrpx_downstream_connection.h
+++ b/src/shrpx_downstream_connection.h
@@ -58,7 +58,7 @@ public:
virtual int on_write() = 0;
virtual int on_timeout() { return 0; }
- virtual void on_upstream_change(Upstream *uptream) = 0;
+ virtual void on_upstream_change(Upstream *upstream) = 0;
// true if this object is poolable.
virtual bool poolable() const = 0;
diff --git a/src/shrpx_health_monitor_downstream_connection.cc b/src/shrpx_health_monitor_downstream_connection.cc
index 066a2af9..6e33bc15 100644
--- a/src/shrpx_health_monitor_downstream_connection.cc
+++ b/src/shrpx_health_monitor_downstream_connection.cc
@@ -98,7 +98,7 @@ int HealthMonitorDownstreamConnection::on_read() { return 0; }
int HealthMonitorDownstreamConnection::on_write() { return 0; }
-void HealthMonitorDownstreamConnection::on_upstream_change(Upstream *uptream) {}
+void HealthMonitorDownstreamConnection::on_upstream_change(Upstream *upstream) {}
bool HealthMonitorDownstreamConnection::poolable() const { return false; }
diff --git a/src/shrpx_health_monitor_downstream_connection.h b/src/shrpx_health_monitor_downstream_connection.h
index 7439e83b..c0eb6334 100644
--- a/src/shrpx_health_monitor_downstream_connection.h
+++ b/src/shrpx_health_monitor_downstream_connection.h
@@ -49,7 +49,7 @@ public:
virtual int on_read();
virtual int on_write();
- virtual void on_upstream_change(Upstream *uptream);
+ virtual void on_upstream_change(Upstream *upstream);
// true if this object is poolable.
virtual bool poolable() const;
diff --git a/src/shrpx_http2_downstream_connection.h b/src/shrpx_http2_downstream_connection.h
index cdc55b9f..0fc7d91c 100644
--- a/src/shrpx_http2_downstream_connection.h
+++ b/src/shrpx_http2_downstream_connection.h
@@ -60,7 +60,7 @@ public:
virtual void on_upstream_change(Upstream *upstream) {}
- // This object is not poolable because we dont' have facility to
+ // This object is not poolable because we don't have facility to
// migrate to another Http2Session object.
virtual bool poolable() const { return false; }
diff --git a/src/shrpx_http2_session.cc b/src/shrpx_http2_session.cc
index 2f9d2e50..37a6eb40 100644
--- a/src/shrpx_http2_session.cc
+++ b/src/shrpx_http2_session.cc
@@ -206,13 +206,13 @@ Http2Session::Http2Session(struct ev_loop *loop, SSL_CTX *ssl_ctx,
on_read_ = &Http2Session::read_noop;
on_write_ = &Http2Session::write_noop;
- // We will resuse this many times, so use repeat timeout value. The
+ // We will reuse this many times, so use repeat timeout value. The
// timeout value is set later.
ev_timer_init(&connchk_timer_, connchk_timeout_cb, 0., 0.);
connchk_timer_.data = this;
- // SETTINGS ACK timeout is 10 seconds for now. We will resuse this
+ // SETTINGS ACK timeout is 10 seconds for now. We will reuse this
// many times, so use repeat timeout value.
ev_timer_init(&settings_timer_, settings_timeout_cb, 0., 0.);
diff --git a/src/shrpx_http2_upstream.cc b/src/shrpx_http2_upstream.cc
index 5f8b5254..8859ec37 100644
--- a/src/shrpx_http2_upstream.cc
+++ b/src/shrpx_http2_upstream.cc
@@ -1317,7 +1317,7 @@ int Http2Upstream::downstream_eof(DownstreamConnection *dconn) {
downstream->pop_downstream_connection();
// dconn was deleted
dconn = nullptr;
- // downstream wil be deleted in on_stream_close_callback.
+ // downstream will be deleted in on_stream_close_callback.
if (downstream->get_response_state() == DownstreamState::HEADER_COMPLETE) {
// Server may indicate the end of the request by EOF
if (LOG_ENABLED(INFO)) {
@@ -2183,7 +2183,7 @@ int Http2Upstream::submit_push_promise(const StringRef &scheme,
// 4 for :method, :scheme, :path and :authority
nva.reserve(4 + req.fs.headers().size());
- // juse use "GET" for now
+ // just use "GET" for now
nva.push_back(http2::make_nv_ll(":method", "GET"));
nva.push_back(http2::make_nv_ls_nocopy(":scheme", scheme));
nva.push_back(http2::make_nv_ls_nocopy(":path", path));
diff --git a/src/shrpx_http3_upstream.cc b/src/shrpx_http3_upstream.cc
index 90fb9194..89ad3086 100644
--- a/src/shrpx_http3_upstream.cc
+++ b/src/shrpx_http3_upstream.cc
@@ -1023,7 +1023,7 @@ int Http3Upstream::downstream_eof(DownstreamConnection *dconn) {
downstream->pop_downstream_connection();
// dconn was deleted
dconn = nullptr;
- // downstream wil be deleted in on_stream_close_callback.
+ // downstream will be deleted in on_stream_close_callback.
if (downstream->get_response_state() == DownstreamState::HEADER_COMPLETE) {
// Server may indicate the end of the request by EOF
if (LOG_ENABLED(INFO)) {
diff --git a/src/shrpx_null_downstream_connection.cc b/src/shrpx_null_downstream_connection.cc
index 3a80b304..cd81c8aa 100644
--- a/src/shrpx_null_downstream_connection.cc
+++ b/src/shrpx_null_downstream_connection.cc
@@ -74,7 +74,7 @@ int NullDownstreamConnection::on_read() { return 0; }
int NullDownstreamConnection::on_write() { return 0; }
-void NullDownstreamConnection::on_upstream_change(Upstream *uptream) {}
+void NullDownstreamConnection::on_upstream_change(Upstream *upstream) {}
bool NullDownstreamConnection::poolable() const { return false; }
diff --git a/src/shrpx_null_downstream_connection.h b/src/shrpx_null_downstream_connection.h
index 829d659e..7defcc33 100644
--- a/src/shrpx_null_downstream_connection.h
+++ b/src/shrpx_null_downstream_connection.h
@@ -50,7 +50,7 @@ public:
virtual int on_read();
virtual int on_write();
- virtual void on_upstream_change(Upstream *uptream);
+ virtual void on_upstream_change(Upstream *upstream);
// true if this object is poolable.
virtual bool poolable() const;
diff --git a/src/shrpx_worker.h b/src/shrpx_worker.h
index 724c56ed..49670630 100644
--- a/src/shrpx_worker.h
+++ b/src/shrpx_worker.h
@@ -439,7 +439,7 @@ private:
std::shared_ptr ticket_keys_;
std::vector> downstream_addr_groups_;
// Worker level blocker for downstream connection. For example,
- // this is used when file decriptor is exhausted.
+ // this is used when file descriptor is exhausted.
std::unique_ptr connect_blocker_;
bool graceful_shutdown_;
diff --git a/src/util.h b/src/util.h
index e7a07242..2e71f068 100644
--- a/src/util.h
+++ b/src/util.h
@@ -572,7 +572,7 @@ std::string ascii_dump(const uint8_t *data, size_t len);
// Returns absolute path of executable path. If argc == 0 or |cwd| is
// nullptr, this function returns nullptr. If argv[0] starts with
-// '/', this function returns argv[0]. Oterwise return cwd + "/" +
+// '/', this function returns argv[0]. Otherwise return cwd + "/" +
// argv[0]. If non-null is returned, it is NULL-terminated string and
// dynamically allocated by malloc. The caller is responsible to free
// it.
diff --git a/tests/nghttp2_session_test.c b/tests/nghttp2_session_test.c
index 238ed905..cb6bdf73 100644
--- a/tests/nghttp2_session_test.c
+++ b/tests/nghttp2_session_test.c
@@ -2954,7 +2954,7 @@ void test_nghttp2_session_on_request_headers_received(void) {
session->local_settings.max_concurrent_streams =
NGHTTP2_DEFAULT_MAX_CONCURRENT_STREAMS;
- /* Stream ID less than or equal to the previouly received request
+ /* Stream ID less than or equal to the previously received request
HEADERS is just ignored due to race condition */
nghttp2_frame_headers_init(&frame.headers,
NGHTTP2_FLAG_END_HEADERS | NGHTTP2_FLAG_PRIORITY,
@@ -4650,7 +4650,7 @@ void test_nghttp2_session_reprioritize_stream(void) {
CU_ASSERT(10 == stream->weight);
CU_ASSERT(&session->root == stream->dep_prev);
- /* If depenency to idle stream which is not in depdenency tree yet */
+ /* If dependency to idle stream which is not in dependency tree yet */
nghttp2_priority_spec_init(&pri_spec, 3, 99, 0);
@@ -9070,7 +9070,7 @@ void test_nghttp2_session_stream_get_state(void) {
CU_ASSERT(NGHTTP2_STREAM_STATE_RESERVED_LOCAL ==
nghttp2_stream_get_state(stream));
- /* Send resposne to push stream 2 with END_STREAM set */
+ /* Send response to push stream 2 with END_STREAM set */
nghttp2_submit_response(session, 2, resnv, ARRLEN(resnv), NULL);
rv = nghttp2_session_send(session);
diff --git a/third-party/build_config.rb b/third-party/build_config.rb
index 9e66958c..86dd8152 100644
--- a/third-party/build_config.rb
+++ b/third-party/build_config.rb
@@ -3,7 +3,7 @@ MRuby::Build.new do |conf|
toolchain :gcc if ENV['CC'].include? "gcc"
# C++ project needs this. Without this, mruby exception does not
- # properly destory C++ object allocated on stack.
+ # properly destroy C++ object allocated on stack.
conf.enable_cxx_exception
conf.build_dir = ENV['BUILD_DIR']