joyent/http-parser — pull request #123 by bog-dan-ro (2012-08-29 06:08:11+00:00)
Title: Move state enum from http_parser.c to http_parser.h.

It is needed to check the state field of http_parser struct in callback functions. This way when "on_body" callback is called you can check if the state field is "s_message_done", then you parse it without making additional copies., otherwise you need to copy the buffer and wait for on_message_complete callback.