@@ -72,9 +72,9 @@ if (parser->upgrade) {
7272}
7373```
7474
75- HTTP needs to know where the end of the stream is. For example, sometimes
75+ ` http_parser ` needs to know where the end of the stream is. For example, sometimes
7676servers send responses without Content-Length and expect the client to
77- consume input (for the body) until EOF. To tell http_parser about EOF, give
77+ consume input (for the body) until EOF. To tell ` http_parser ` about EOF, give
7878` 0 ` as the fourth parameter to ` http_parser_execute() ` . Callbacks and errors
7979can still be encountered during an EOF, so one must still be prepared
8080to receive them.
@@ -93,7 +93,7 @@ the on_body callback.
9393The Special Problem of Upgrade
9494------------------------------
9595
96- HTTP supports upgrading the connection to a different protocol. An
96+ ` http_parser ` supports upgrading the connection to a different protocol. An
9797increasingly common example of this is the WebSocket protocol which sends
9898a request like
9999
@@ -144,7 +144,7 @@ parse a request, and then give a response over that socket. By instantiation
144144of a thread-local struct containing relevant data (e.g. accepted socket,
145145allocated memory for callbacks to write into, etc), a parser's callbacks are
146146able to communicate data between the scope of the thread and the scope of the
147- callback in a threadsafe manner. This allows http-parser to be used in
147+ callback in a threadsafe manner. This allows ` http_parser ` to be used in
148148multi-threaded contexts.
149149
150150Example:
@@ -202,7 +202,7 @@ void http_parser_thread(socket_t sock) {
202202
203203In case you parse HTTP message in chunks (i.e. `read()` request line
204204from socket, parse, read half headers, parse, etc) your data callbacks
205- may be called more than once. Http-parser guarantees that data pointer is only
205+ may be called more than once. `http_parser` guarantees that data pointer is only
206206valid for the lifetime of callback. You can also `read()` into a heap allocated
207207buffer to avoid copying memory around if this fits your application.
208208
0 commit comments