11 #ifndef CPP_WEB_SERVER_HTTP_REQUEST_PARSER_HPP 12 #define CPP_WEB_SERVER_HTTP_REQUEST_PARSER_HPP 16 #include <boost/logic/tribool.hpp> 17 #include <boost/tuple/tuple.hpp> 35 template<
typename InputIterator>
36 boost::tuple<boost::tribool, InputIterator>
41 boost::tribool result =
consume(req, *begin++);
42 if (result || !result)
43 return boost::make_tuple(result, begin);
45 boost::tribool result = boost::indeterminate;
46 return boost::make_tuple(result, begin);
static bool is_digit(int c)
Check if a byte is a digit.
static bool is_tspecial(int c)
Check if a byte is defined as an HTTP tspecial character.
void reset()
Reset to initial parser state.
static bool is_char(int c)
Check if a byte is an HTTP character.
HttpRequestParser()
Construct ready to parse the request method.
enum async_web_server_cpp::HttpRequestParser::state state_
static bool is_ctl(int c)
Check if a byte is an HTTP control character.
state
The current state of the parser.
boost::tribool consume(HttpRequest &req, char input)
Handle the next character of input.
boost::tuple< boost::tribool, InputIterator > parse(HttpRequest &req, InputIterator begin, InputIterator end)