#pragma once #include struct span { int start; int length; }; struct header { struct span name; struct span value; }; struct request { int (* step)(struct request *); char * data; int length; int position; lua_State * lua; int reference; struct span temp; int expected_data_length; }; struct request * new_request(lua_State *); void free_request(lua_State *, struct request *); int parse_request(lua_State *, int, struct request **); int parse_step_method(struct request *); int parse_step_path(struct request *); int parse_step_version(struct request *); int parse_step_header_name(struct request *); int parse_step_header_value(struct request *);