#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; struct span path; struct span version; struct header * headerv; int headerc; struct span body; }; 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 *);