#include <http_request_parser.hpp>
Public Member Functions | |
HttpRequestParser () | |
Construct ready to parse the request method. More... | |
template<typename InputIterator > | |
boost::tuple< boost::tribool, InputIterator > | parse (HttpRequest &req, InputIterator begin, InputIterator end) |
void | reset () |
Reset to initial parser state. More... | |
Private Types | |
enum | state { method_start, method, uri, http_version_h, http_version_t_1, http_version_t_2, http_version_p, http_version_slash, http_version_major_start, http_version_major, http_version_minor_start, http_version_minor, expecting_newline_1, header_line_start, header_lws, header_name, space_before_header_value, header_value, expecting_newline_2, expecting_newline_3 } |
The current state of the parser. More... | |
Private Member Functions | |
boost::tribool | consume (HttpRequest &req, char input) |
Handle the next character of input. More... | |
Static Private Member Functions | |
static bool | is_char (int c) |
Check if a byte is an HTTP character. More... | |
static bool | is_ctl (int c) |
Check if a byte is an HTTP control character. More... | |
static bool | is_digit (int c) |
Check if a byte is a digit. More... | |
static bool | is_tspecial (int c) |
Check if a byte is defined as an HTTP tspecial character. More... | |
Private Attributes | |
enum async_web_server_cpp::HttpRequestParser::state | state_ |
Definition at line 22 of file http_request_parser.hpp.
|
private |
The current state of the parser.
Definition at line 66 of file http_request_parser.hpp.
async_web_server_cpp::HttpRequestParser::HttpRequestParser | ( | ) |
Construct ready to parse the request method.
Definition at line 15 of file http_request_parser.cpp.
|
private |
Handle the next character of input.
Definition at line 22 of file http_request_parser.cpp.
|
staticprivate |
Check if a byte is an HTTP character.
Definition at line 284 of file http_request_parser.cpp.
|
staticprivate |
Check if a byte is an HTTP control character.
Definition at line 289 of file http_request_parser.cpp.
|
staticprivate |
Check if a byte is a digit.
Definition at line 323 of file http_request_parser.cpp.
|
staticprivate |
Check if a byte is defined as an HTTP tspecial character.
Definition at line 294 of file http_request_parser.cpp.
|
inline |
Parse some data. The tribool return value is true when a complete request has been parsed, false if the data is invalid, indeterminate when more data is required. The InputIterator return value indicates how much of the input has been consumed.
Definition at line 37 of file http_request_parser.hpp.
void async_web_server_cpp::HttpRequestParser::reset | ( | ) |
Reset to initial parser state.
Definition at line 17 of file http_request_parser.cpp.
|
private |