diff options
author | Fedor Indutny <fedor@indutny.com> | 2015-01-14 16:00:26 +0300 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2015-01-15 00:13:40 +0300 |
commit | 598efcbe7f4d795622f038e0ba28c7b119927a14 (patch) | |
tree | 3883b27df802c83a655208db1de19a3303cc90cb /deps/http_parser/README.md | |
parent | 3dd7ebb0ba181960fb6d7131e11243a6ec85458d (diff) | |
download | node-new-598efcbe7f4d795622f038e0ba28c7b119927a14.tar.gz |
deps: update http_parser to 2.4.1
PR-URL: https://github.com/iojs/io.js/pull/397
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/http_parser/README.md')
-rw-r--r-- | deps/http_parser/README.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/deps/http_parser/README.md b/deps/http_parser/README.md index 0bf5d359ac..7c54dd42d0 100644 --- a/deps/http_parser/README.md +++ b/deps/http_parser/README.md @@ -61,7 +61,7 @@ if (recved < 0) { } /* Start up / continue the parser. - * Note we pass recved==0 to signal that EOF has been recieved. + * Note we pass recved==0 to signal that EOF has been received. */ nparsed = http_parser_execute(parser, &settings, buf, recved); @@ -75,7 +75,7 @@ if (parser->upgrade) { HTTP needs to know where the end of the stream is. For example, sometimes servers send responses without Content-Length and expect the client to consume input (for the body) until EOF. To tell http_parser about EOF, give -`0` as the forth parameter to `http_parser_execute()`. Callbacks and errors +`0` as the fourth parameter to `http_parser_execute()`. Callbacks and errors can still be encountered during an EOF, so one must still be prepared to receive them. @@ -110,7 +110,7 @@ followed by non-HTTP data. information the Web Socket protocol.) To support this, the parser will treat this as a normal HTTP message without a -body. Issuing both on_headers_complete and on_message_complete callbacks. However +body, issuing both on_headers_complete and on_message_complete callbacks. However http_parser_execute() will stop parsing at the end of the headers and return. The user is expected to check if `parser->upgrade` has been set to 1 after @@ -131,7 +131,7 @@ There are two types of callbacks: * notification `typedef int (*http_cb) (http_parser*);` Callbacks: on_message_begin, on_headers_complete, on_message_complete. * data `typedef int (*http_data_cb) (http_parser*, const char *at, size_t length);` - Callbacks: (requests only) on_uri, + Callbacks: (requests only) on_url, (common) on_header_field, on_header_value, on_body; Callbacks 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. Reading headers may be a tricky task if you read/parse headers partially. Basically, you need to remember whether last header callback was field or value -and apply following logic: +and apply the following logic: (on_header_field and on_header_value shortened to on_h_*) ------------------------ ------------ -------------------------------------------- |