Fix typos

This commit is contained in:
Dimitris Apostolou 2022-01-13 22:21:56 +02:00 committed by Tatsuhiro Tsujikawa
parent 8a552631b4
commit ad0c9eebf7
36 changed files with 45 additions and 44 deletions

View File

@ -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.

View File

@ -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`; \

View File

@ -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++"
;;
*)

View File

@ -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:

View File

@ -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()

View File

@ -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

View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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.
*/

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -2128,7 +2128,7 @@ Options:
-H, --header=<HEADER>
Add/Override a header to the requests.
--ciphers=<SUITE>
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"(

View File

@ -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(

View File

@ -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; }

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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) {

View File

@ -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();

View File

@ -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);

View File

@ -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;

View File

@ -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; }

View File

@ -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;

View File

@ -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; }

View File

@ -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.);

View File

@ -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));

View File

@ -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)) {

View File

@ -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; }

View File

@ -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;

View File

@ -439,7 +439,7 @@ private:
std::shared_ptr<TicketKeys> ticket_keys_;
std::vector<std::shared_ptr<DownstreamAddrGroup>> 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<ConnectBlocker> connect_blocker_;
bool graceful_shutdown_;

View File

@ -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.

View File

@ -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);

View File

@ -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']