That is, for a request parser do this:
http_parser_init(my_parser, HTTP_REQUEST)
for a response parser do this:
http_parser_init(my_parser, HTTP_RESPONSE)
Then http_parse_requests() and http_parse_responses() both turn
into http_parer_execute().
Trashing the old Ragel parser (which was based on Mongrel) because it's
proving difficult to get the control I need in end-of-message cases.
Replacing this with a hand written parser using a couple tricks borrowed
from NGINX. The new parser will be much more work to write, but should prove
faster and allow for better hacking.
Instead of returning a boolean and calling assert() in main(), test.c now
calls assert() as soon as possible. This will require gdb to know what is failing
but that was probably already true before and this way uses a lot less code.
I also added a conditional to the parser which, perhaps, splits input more efficiently
into request and responses. I'm playing around with this and it will likely
change again in the future.
And much more:
* Begin the framework for parsing HTTP responses
* Modify the test code with the new layout
* Remove EBB_ prefix and use just HTTP_
* Start simple new Makefile
Currently the test passes but it is only checking HTTP requests. I get the
feeling that it is much slower than before, although I have no solid
evidence for this.