diff --git a/doc/sources/libnghttp2_asio.rst b/doc/sources/libnghttp2_asio.rst index 76999f9f..2f348e77 100644 --- a/doc/sources/libnghttp2_asio.rst +++ b/doc/sources/libnghttp2_asio.rst @@ -290,7 +290,7 @@ Normally, client does not stop even after all requests are done unless connection is lost. To stop client, call ``nghttp2::asio_http2::server::session::shutdown()``. -Recieve server push and enable SSL/TLS +Receive server push and enable SSL/TLS ++++++++++++++++++++++++++++++++++++++ .. code-block:: cpp diff --git a/integration-tests/server_tester.go b/integration-tests/server_tester.go index ccb0b150..dd4c341f 100644 --- a/integration-tests/server_tester.go +++ b/integration-tests/server_tester.go @@ -769,7 +769,7 @@ type serverResponse struct { connErr bool // true if HTTP/2 connection error spdyGoAwayErrCode spdy.GoAwayStatus // status code received in SPDY RST_STREAM spdyRstErrCode spdy.RstStreamStatus // status code received in SPDY GOAWAY - connClose bool // Conection: close is included in response header in HTTP/1 test + connClose bool // Connection: close is included in response header in HTTP/1 test reqHeader http.Header // http request header, currently only sotres pushed request header pushResponse []*serverResponse // pushed response } diff --git a/lib/nghttp2_buf.h b/lib/nghttp2_buf.h index 06ab1e4c..9f484a22 100644 --- a/lib/nghttp2_buf.h +++ b/lib/nghttp2_buf.h @@ -398,7 +398,7 @@ int nghttp2_bufs_advance(nghttp2_bufs *bufs); void nghttp2_bufs_seek_last_present(nghttp2_bufs *bufs); /* - * Returns nonzero if bufs->cur->next is not emtpy. + * Returns nonzero if bufs->cur->next is not empty. */ int nghttp2_bufs_next_present(nghttp2_bufs *bufs); diff --git a/lib/nghttp2_hd.h b/lib/nghttp2_hd.h index 458edafe..87f335d5 100644 --- a/lib/nghttp2_hd.h +++ b/lib/nghttp2_hd.h @@ -313,7 +313,7 @@ void nghttp2_hd_deflate_free(nghttp2_hd_deflater *deflater); * * This function expands |bufs| as necessary to store the result. If * buffers is full and the process still requires more space, this - * funtion fails and returns NGHTTP2_ERR_HEADER_COMP. + * function fails and returns NGHTTP2_ERR_HEADER_COMP. * * After this function returns, it is safe to delete the |nva|. * diff --git a/lib/nghttp2_outbound_item.h b/lib/nghttp2_outbound_item.h index 8bda776b..89a8a926 100644 --- a/lib/nghttp2_outbound_item.h +++ b/lib/nghttp2_outbound_item.h @@ -112,7 +112,7 @@ struct nghttp2_outbound_item { nghttp2_ext_frame_payload ext_frame_payload; nghttp2_aux_data aux_data; /* The priority used in priority comparion. Smaller is served - ealier. For PING, SETTINGS and non-DATA frames (excluding + 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 effective weight and frame payload length previously sent, so diff --git a/lib/nghttp2_pq.h b/lib/nghttp2_pq.h index 1426bef7..bd97ca35 100644 --- a/lib/nghttp2_pq.h +++ b/lib/nghttp2_pq.h @@ -71,7 +71,7 @@ void nghttp2_pq_free(nghttp2_pq *pq); /* * Adds |item| to the priority queue |pq|. * - * This function returns 0 if it succeds, or one of the following + * This function returns 0 if it succeeds, or one of the following * negative error codes: * * NGHTTP2_ERR_NOMEM diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index 4bc94cbb..758989ba 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -2183,7 +2183,7 @@ static int session_prep_frame(nghttp2_session *session, closed. */ stream = nghttp2_session_get_stream(session, frame->hd.stream_id); - /* predicte should fail if stream is NULL. */ + /* predicate should fail if stream is NULL. */ rv = session_predicate_push_promise_send(session, stream); if (rv != 0) { return rv; @@ -3781,7 +3781,7 @@ int nghttp2_session_on_request_headers_received(nghttp2_session *session, session, frame, NGHTTP2_ERR_PROTO, "request HEADERS: stream_id == 0"); } - /* If client recieves idle stream from server, it is invalid + /* If client receives idle stream from server, it is invalid regardless stream ID is even or odd. This is because client is not expected to receive request from server. */ if (!session->server) { @@ -5588,7 +5588,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in, if (iframe->payloadleft) { nghttp2_settings_entry *min_header_table_size_entry; - /* We allocate iv with addtional one entry, to store the + /* We allocate iv with additional one entry, to store the minimum header table size. */ iframe->max_niv = iframe->frame.hd.length / NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH + 1; diff --git a/lib/nghttp2_session.h b/lib/nghttp2_session.h index 3e1467f6..c7cb27d7 100644 --- a/lib/nghttp2_session.h +++ b/lib/nghttp2_session.h @@ -319,7 +319,7 @@ struct nghttp2_session { uint8_t pending_enable_push; /* Nonzero if the session is server side. */ uint8_t server; - /* Flags indicating GOAWAY is sent and/or recieved. The flags are + /* Flags indicating GOAWAY is sent and/or received. The flags are composed by bitwise OR-ing nghttp2_goaway_flag. */ uint8_t goaway_flags; /* This flag is used to reduce excessive queuing of WINDOW_UPDATE to @@ -722,7 +722,7 @@ int nghttp2_session_on_goaway_received(nghttp2_session *session, nghttp2_frame *frame); /* - * Called when WINDOW_UPDATE is recieved, assuming |frame| is properly + * Called when WINDOW_UPDATE is received, assuming |frame| is properly * initialized. * * This function returns 0 if it succeeds, or one of the following @@ -737,7 +737,7 @@ int nghttp2_session_on_window_update_received(nghttp2_session *session, nghttp2_frame *frame); /* - * Called when ALTSVC is recieved, assuming |frame| is properly + * Called when ALTSVC is received, assuming |frame| is properly * initialized. * * This function returns 0 if it succeeds, or one of the following diff --git a/src/HttpServer.cc b/src/HttpServer.cc index 8466fec0..1bf2f585 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -1779,7 +1779,7 @@ struct ClientInfo { struct Worker { std::unique_ptr sessions; ev_async w; - // protectes q + // protects q std::mutex m; std::deque q; }; diff --git a/src/h2load.h b/src/h2load.h index 69d9a6ee..01a47c1e 100644 --- a/src/h2load.h +++ b/src/h2load.h @@ -144,7 +144,7 @@ struct ClientStat { // time client end (i.e., client somehow processed all requests it // is responsible for, and disconnected) std::chrono::steady_clock::time_point client_end_time; - // The number of requests completed successfull, but not necessarily + // The number of requests completed successful, but not necessarily // means successful HTTP status code. size_t req_success; @@ -185,7 +185,7 @@ struct Stats { size_t req_started; // The number of requests finished size_t req_done; - // The number of requests completed successfull, but not necessarily + // The number of requests completed successful, but not necessarily // means successful HTTP status code. size_t req_success; // The number of requests marked as success. HTTP status code is diff --git a/src/http2.cc b/src/http2.cc index 9ee1679b..5203a4d5 100644 --- a/src/http2.cc +++ b/src/http2.cc @@ -1598,7 +1598,7 @@ template InputIt eat_file(InputIt first, InputIt last) { for (; p != first && *(p - 1) != '/'; --p) ; if (p == first) { - // this should not happend in normal case, where we expect path + // this should not happened in normal case, where we expect path // starts with '/' *first++ = '/'; return first; diff --git a/src/http2.h b/src/http2.h index db2983f1..eb6a41d3 100644 --- a/src/http2.h +++ b/src/http2.h @@ -268,7 +268,7 @@ void erase_header(HeaderRef *hd); // // This function returns the new rewritten URI on success. If the // location URI is not subject to the rewrite, this function returns -// emtpy string. +// empty string. StringRef rewrite_location_uri(BlockAllocator &balloc, const StringRef &uri, const http_parser_url &u, const StringRef &match_host, diff --git a/src/shrpx_downstream.h b/src/shrpx_downstream.h index 42ff4013..df011075 100644 --- a/src/shrpx_downstream.h +++ b/src/shrpx_downstream.h @@ -252,7 +252,7 @@ public: // Returns true if upgrade (HTTP Upgrade or CONNECT) is succeeded. // This should not depend on inspect_http1_response(). void check_upgrade_fulfilled(); - // Returns true if the upgrade is succeded as a result of the call + // Returns true if the upgrade is succeeded as a result of the call // check_upgrade_fulfilled(). HTTP/2 Upgrade is excluded. bool get_upgraded() const; // Inspects HTTP/2 request. diff --git a/src/shrpx_http2_session.cc b/src/shrpx_http2_session.cc index 539edfed..a4ab465f 100644 --- a/src/shrpx_http2_session.cc +++ b/src/shrpx_http2_session.cc @@ -1145,7 +1145,7 @@ int on_response_headers(Http2Session *http2session, Downstream *downstream, if (downstream->get_upgraded()) { resp.connection_close = true; - // On upgrade sucess, both ends can send data + // On upgrade success, both ends can send data if (upstream->resume_read(SHRPX_NO_BUFFER, downstream, 0) != 0) { // If resume_read fails, just drop connection. Not ideal. delete handler; diff --git a/src/shrpx_worker_process.cc b/src/shrpx_worker_process.cc index 558029f3..d8329b5f 100644 --- a/src/shrpx_worker_process.cc +++ b/src/shrpx_worker_process.cc @@ -116,7 +116,7 @@ void graceful_shutdown(ConnectionHandler *conn_handler) { conn_handler->disable_acceptor(); - // After disabling accepting new connection, disptach incoming + // After disabling accepting new connection, dispatch incoming // connection in backlog. conn_handler->accept_pending_connection(); diff --git a/tests/nghttp2_session_test.c b/tests/nghttp2_session_test.c index fc57e982..0cf765fa 100644 --- a/tests/nghttp2_session_test.c +++ b/tests/nghttp2_session_test.c @@ -938,7 +938,7 @@ void test_nghttp2_session_recv_data(void) { stream = open_sent_stream2(session, 1, NGHTTP2_STREAM_CLOSING); /* Set initial window size 16383 to check stream flow control, - isolating it from the conneciton flow control */ + isolating it from the connection flow control */ stream->local_window_size = 16383; ud.data_chunk_recv_cb_called = 0;