Fix typos

This commit is contained in:
Tatsuhiro Tsujikawa 2017-10-28 22:25:42 +09:00
parent 66d5e24606
commit aaeeec8f1c
16 changed files with 21 additions and 21 deletions

View File

@ -290,7 +290,7 @@ Normally, client does not stop even after all requests are done unless
connection is lost. To stop client, call connection is lost. To stop client, call
``nghttp2::asio_http2::server::session::shutdown()``. ``nghttp2::asio_http2::server::session::shutdown()``.
Recieve server push and enable SSL/TLS Receive server push and enable SSL/TLS
++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++
.. code-block:: cpp .. code-block:: cpp

View File

@ -769,7 +769,7 @@ type serverResponse struct {
connErr bool // true if HTTP/2 connection error connErr bool // true if HTTP/2 connection error
spdyGoAwayErrCode spdy.GoAwayStatus // status code received in SPDY RST_STREAM spdyGoAwayErrCode spdy.GoAwayStatus // status code received in SPDY RST_STREAM
spdyRstErrCode spdy.RstStreamStatus // status code received in SPDY GOAWAY 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 reqHeader http.Header // http request header, currently only sotres pushed request header
pushResponse []*serverResponse // pushed response pushResponse []*serverResponse // pushed response
} }

View File

@ -398,7 +398,7 @@ int nghttp2_bufs_advance(nghttp2_bufs *bufs);
void nghttp2_bufs_seek_last_present(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); int nghttp2_bufs_next_present(nghttp2_bufs *bufs);

View File

@ -313,7 +313,7 @@ void nghttp2_hd_deflate_free(nghttp2_hd_deflater *deflater);
* *
* This function expands |bufs| as necessary to store the result. If * This function expands |bufs| as necessary to store the result. If
* buffers is full and the process still requires more space, this * 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|. * After this function returns, it is safe to delete the |nva|.
* *

View File

@ -112,7 +112,7 @@ struct nghttp2_outbound_item {
nghttp2_ext_frame_payload ext_frame_payload; nghttp2_ext_frame_payload ext_frame_payload;
nghttp2_aux_data aux_data; nghttp2_aux_data aux_data;
/* The priority used in priority comparion. Smaller is served /* 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. response HEADERS frame) have dedicated cycle value defined above.
For DATA frame, cycle is computed by taking into account of For DATA frame, cycle is computed by taking into account of
effective weight and frame payload length previously sent, so effective weight and frame payload length previously sent, so

View File

@ -71,7 +71,7 @@ void nghttp2_pq_free(nghttp2_pq *pq);
/* /*
* Adds |item| to the priority queue |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: * negative error codes:
* *
* NGHTTP2_ERR_NOMEM * NGHTTP2_ERR_NOMEM

View File

@ -2183,7 +2183,7 @@ static int session_prep_frame(nghttp2_session *session,
closed. */ closed. */
stream = nghttp2_session_get_stream(session, frame->hd.stream_id); 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); rv = session_predicate_push_promise_send(session, stream);
if (rv != 0) { if (rv != 0) {
return rv; 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"); 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 regardless stream ID is even or odd. This is because client is
not expected to receive request from server. */ not expected to receive request from server. */
if (!session->server) { if (!session->server) {
@ -5588,7 +5588,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
if (iframe->payloadleft) { if (iframe->payloadleft) {
nghttp2_settings_entry *min_header_table_size_entry; 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. */ minimum header table size. */
iframe->max_niv = iframe->max_niv =
iframe->frame.hd.length / NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH + 1; iframe->frame.hd.length / NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH + 1;

View File

@ -319,7 +319,7 @@ struct nghttp2_session {
uint8_t pending_enable_push; uint8_t pending_enable_push;
/* Nonzero if the session is server side. */ /* Nonzero if the session is server side. */
uint8_t server; 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. */ composed by bitwise OR-ing nghttp2_goaway_flag. */
uint8_t goaway_flags; uint8_t goaway_flags;
/* This flag is used to reduce excessive queuing of WINDOW_UPDATE to /* 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); nghttp2_frame *frame);
/* /*
* Called when WINDOW_UPDATE is recieved, assuming |frame| is properly * Called when WINDOW_UPDATE is received, assuming |frame| is properly
* initialized. * initialized.
* *
* This function returns 0 if it succeeds, or one of the following * 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); nghttp2_frame *frame);
/* /*
* Called when ALTSVC is recieved, assuming |frame| is properly * Called when ALTSVC is received, assuming |frame| is properly
* initialized. * initialized.
* *
* This function returns 0 if it succeeds, or one of the following * This function returns 0 if it succeeds, or one of the following

View File

@ -1779,7 +1779,7 @@ struct ClientInfo {
struct Worker { struct Worker {
std::unique_ptr<Sessions> sessions; std::unique_ptr<Sessions> sessions;
ev_async w; ev_async w;
// protectes q // protects q
std::mutex m; std::mutex m;
std::deque<ClientInfo> q; std::deque<ClientInfo> q;
}; };

View File

@ -144,7 +144,7 @@ struct ClientStat {
// time client end (i.e., client somehow processed all requests it // time client end (i.e., client somehow processed all requests it
// is responsible for, and disconnected) // is responsible for, and disconnected)
std::chrono::steady_clock::time_point client_end_time; 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. // means successful HTTP status code.
size_t req_success; size_t req_success;
@ -185,7 +185,7 @@ struct Stats {
size_t req_started; size_t req_started;
// The number of requests finished // The number of requests finished
size_t req_done; 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. // means successful HTTP status code.
size_t req_success; size_t req_success;
// The number of requests marked as success. HTTP status code is // The number of requests marked as success. HTTP status code is

View File

@ -1598,7 +1598,7 @@ template <typename InputIt> InputIt eat_file(InputIt first, InputIt last) {
for (; p != first && *(p - 1) != '/'; --p) for (; p != first && *(p - 1) != '/'; --p)
; ;
if (p == first) { 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 '/' // starts with '/'
*first++ = '/'; *first++ = '/';
return first; return first;

View File

@ -268,7 +268,7 @@ void erase_header(HeaderRef *hd);
// //
// This function returns the new rewritten URI on success. If the // This function returns the new rewritten URI on success. If the
// location URI is not subject to the rewrite, this function returns // location URI is not subject to the rewrite, this function returns
// emtpy string. // empty string.
StringRef rewrite_location_uri(BlockAllocator &balloc, const StringRef &uri, StringRef rewrite_location_uri(BlockAllocator &balloc, const StringRef &uri,
const http_parser_url &u, const http_parser_url &u,
const StringRef &match_host, const StringRef &match_host,

View File

@ -252,7 +252,7 @@ public:
// Returns true if upgrade (HTTP Upgrade or CONNECT) is succeeded. // Returns true if upgrade (HTTP Upgrade or CONNECT) is succeeded.
// This should not depend on inspect_http1_response(). // This should not depend on inspect_http1_response().
void check_upgrade_fulfilled(); 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. // check_upgrade_fulfilled(). HTTP/2 Upgrade is excluded.
bool get_upgraded() const; bool get_upgraded() const;
// Inspects HTTP/2 request. // Inspects HTTP/2 request.

View File

@ -1145,7 +1145,7 @@ int on_response_headers(Http2Session *http2session, Downstream *downstream,
if (downstream->get_upgraded()) { if (downstream->get_upgraded()) {
resp.connection_close = true; 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 (upstream->resume_read(SHRPX_NO_BUFFER, downstream, 0) != 0) {
// If resume_read fails, just drop connection. Not ideal. // If resume_read fails, just drop connection. Not ideal.
delete handler; delete handler;

View File

@ -116,7 +116,7 @@ void graceful_shutdown(ConnectionHandler *conn_handler) {
conn_handler->disable_acceptor(); conn_handler->disable_acceptor();
// After disabling accepting new connection, disptach incoming // After disabling accepting new connection, dispatch incoming
// connection in backlog. // connection in backlog.
conn_handler->accept_pending_connection(); conn_handler->accept_pending_connection();

View File

@ -938,7 +938,7 @@ void test_nghttp2_session_recv_data(void) {
stream = open_sent_stream2(session, 1, NGHTTP2_STREAM_CLOSING); stream = open_sent_stream2(session, 1, NGHTTP2_STREAM_CLOSING);
/* Set initial window size 16383 to check stream flow control, /* 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; stream->local_window_size = 16383;
ud.data_chunk_recv_cb_called = 0; ud.data_chunk_recv_cb_called = 0;