@@ -61,7 +61,7 @@ if (recved < 0) {
6161}
6262
6363/* Start up / continue the parser.
64- * Note we pass recved==0 to signal that EOF has been received .
64+ * Note we pass recved==0 to signal that EOF has been recieved .
6565 */
6666nparsed = http_parser_execute(parser, &settings, buf, recved);
6767
@@ -75,7 +75,7 @@ if (parser->upgrade) {
7575HTTP needs to know where the end of the stream is. For example, sometimes
7676servers send responses without Content-Length and expect the client to
7777consume input (for the body) until EOF. To tell http_parser about EOF, give
78- ` 0 ` as the fourth parameter to ` http_parser_execute() ` . Callbacks and errors
78+ ` 0 ` as the forth parameter to ` http_parser_execute() ` . Callbacks and errors
7979can still be encountered during an EOF, so one must still be prepared
8080to receive them.
8181
@@ -110,7 +110,7 @@ followed by non-HTTP data.
110110information the Web Socket protocol.)
111111
112112To support this, the parser will treat this as a normal HTTP message without a
113- body, issuing both on_headers_complete and on_message_complete callbacks. However
113+ body. Issuing both on_headers_complete and on_message_complete callbacks. However
114114http_parser_execute() will stop parsing at the end of the headers and return.
115115
116116The user is expected to check if ` parser->upgrade ` has been set to 1 after
@@ -131,7 +131,7 @@ There are two types of callbacks:
131131* notification ` typedef int (*http_cb) (http_parser*); `
132132 Callbacks: on_message_begin, on_headers_complete, on_message_complete.
133133* data ` typedef int (*http_data_cb) (http_parser*, const char *at, size_t length); `
134- Callbacks: (requests only) on_url ,
134+ Callbacks: (requests only) on_uri ,
135135 (common) on_header_field, on_header_value, on_body;
136136
137137Callbacks must return 0 on success. Returning a non-zero value indicates
@@ -145,7 +145,7 @@ buffer to avoid copying memory around if this fits your application.
145145
146146Reading headers may be a tricky task if you read/parse headers partially.
147147Basically, you need to remember whether last header callback was field or value
148- and apply the following logic:
148+ and apply following logic:
149149
150150 (on_header_field and on_header_value shortened to on_h_*)
151151 ------------------------ ------------ --------------------------------------------
0 commit comments