11 #ifndef HTTP_SERVER3_REQUEST_PARSER_HPP 12 #define HTTP_SERVER3_REQUEST_PARSER_HPP 14 #include <boost/logic/tribool.hpp> 15 #include <boost/tuple/tuple.hpp> 36 template <
typename InputIterator>
38 InputIterator
begin, InputIterator
end)
42 boost::tribool result = consume(req, *begin++);
43 if (result || !result)
44 return boost::make_tuple(result, begin);
46 boost::tribool result = boost::indeterminate;
47 return boost::make_tuple(result, begin);
52 boost::tribool consume(
request& req,
char input);
55 static bool is_char(
int c);
58 static bool is_ctl(
int c);
61 static bool is_tspecial(
int c);
64 static bool is_digit(
int c);
77 http_version_major_start,
79 http_version_minor_start,
85 space_before_header_value,
95 #endif // HTTP_SERVER3_REQUEST_PARSER_HPP boost::tuple< boost::tribool, InputIterator > parse(request &req, InputIterator begin, InputIterator end)
request_parser()
Construct ready to parse the request method.
SocketService Iterator begin
SocketService Iterator Iterator end
void reset()
Reset to initial parser state.
Parser for incoming requests.
A request received from a client.