From f6dc4f3d4bdf9a90b1638fc6cacaf36fd5ac578a Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 9 Jun 2009 14:22:41 +0200 Subject: [PATCH] Add docs regarding the resetting of status_code --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 26c3e96..577d159 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,12 @@ buffering the data is not necessary. If you need to save certain data for later usage, you can do that from the callbacks. (You can also `read()` into a heap allocated buffer to avoid copying memory around if this fits your application.) + +Scalar valued message information such as `status_code`, `method`, and the +HTTP version are stored in the parser structure. This data is only +temporarlly stored in `http_parser` and gets reset on each new message. If +this information is needed later, copy it out of the structure during the +`headers_complete` callback. The parser decodes the transfer-encoding for both requests and responses transparently. That is, a chunked encoding is decoded before being sent to