Namespaces | |
body_encoding | |
state | |
Classes | |
class | parser |
Base HTTP parser. More... | |
class | request |
Stores, parses, and manipulates HTTP requests. More... | |
class | response |
Stores, parses, and manipulates HTTP responses. More... | |
Typedefs | |
typedef std::map< std::string, std::string, utility::ci_less > | header_list |
Functions | |
template<typename InputIterator > | |
std::pair< std::string, InputIterator > | extract_token (InputIterator begin, InputIterator end) |
Read and return the next token in the stream. More... | |
template<typename InputIterator > | |
std::pair< std::string, InputIterator > | extract_quoted_string (InputIterator begin, InputIterator end) |
Read and return the next quoted string in the stream. More... | |
template<typename InputIterator > | |
InputIterator | extract_lws (InputIterator begin, InputIterator end) |
Read and discard one unit of linear whitespace. More... | |
template<typename InputIterator > | |
InputIterator | extract_all_lws (InputIterator begin, InputIterator end) |
Read and discard linear whitespace. More... | |
template<typename InputIterator > | |
InputIterator | extract_attributes (InputIterator begin, InputIterator end, attribute_list &attributes) |
Extract HTTP attributes. More... | |
template<typename InputIterator > | |
InputIterator | extract_parameters (InputIterator begin, InputIterator end, parameter_list ¶meters) |
Extract HTTP parameters. More... | |
std::string | strip_lws (std::string const &input) |
typedef std::map<std::string, std::string, utility::ci_less > websocketpp::http::parser::header_list |
Definition at line 60 of file parser.hpp.
std::pair<std::string,InputIterator> websocketpp::http::parser::extract_token | ( | InputIterator | begin, |
InputIterator | end | ||
) |
Read and return the next token in the stream.
Read until a non-token character is found and then return the token and iterator to the next character to read
begin | An iterator to the beginning of the sequence |
end | An iterator to the end of the sequence |
Definition at line 73 of file parser.hpp.
References websocketpp::http::is_not_token_char().
Referenced by BOOST_AUTO_TEST_CASE(), extract_attributes(), and extract_parameters().
std::pair<std::string,InputIterator> websocketpp::http::parser::extract_quoted_string | ( | InputIterator | begin, |
InputIterator | end | ||
) |
Read and return the next quoted string in the stream.
Read a double quoted string starting at begin
. The quotes themselves are stripped. The quoted value is returned along with an iterator to the next character to read
begin | An iterator to the beginning of the sequence |
end | An iterator to the end of the sequence |
Definition at line 92 of file parser.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), and extract_attributes().
InputIterator websocketpp::http::parser::extract_lws | ( | InputIterator | begin, |
InputIterator | end | ||
) |
Read and discard one unit of linear whitespace.
Read one unit of linear white space and return the iterator to the character afterwards. If begin
is returned, no whitespace was extracted.
begin | An iterator to the beginning of the sequence |
end | An iterator to the end of the sequence |
Definition at line 139 of file parser.hpp.
References websocketpp::http::is_not_whitespace_char(), and websocketpp::http::is_whitespace_char().
Referenced by extract_all_lws().
InputIterator websocketpp::http::parser::extract_all_lws | ( | InputIterator | begin, |
InputIterator | end | ||
) |
Read and discard linear whitespace.
Read linear white space until a non-lws character is read and return an iterator to that character. If begin
is returned, no whitespace was extracted.
begin | An iterator to the beginning of the sequence |
end | An iterator to the end of the sequence |
Definition at line 164 of file parser.hpp.
References extract_lws().
Referenced by BOOST_AUTO_TEST_CASE(), extract_attributes(), extract_parameters(), and strip_lws().
InputIterator websocketpp::http::parser::extract_attributes | ( | InputIterator | begin, |
InputIterator | end, | ||
attribute_list & | attributes | ||
) |
Extract HTTP attributes.
An http attributes list is a semicolon delimited list of key value pairs in the format: *( ";" attribute "=" value ) where attribute is a token and value is a token or quoted string.
Attributes extracted are appended to the supplied attributes list attributes
.
[in] | begin | An iterator to the beginning of the sequence |
[in] | end | An iterator to the end of the sequence |
[out] | attributes | A reference to the attributes list to append attribute/value pairs extracted to |
Definition at line 195 of file parser.hpp.
References extract_all_lws(), extract_quoted_string(), and extract_token().
Referenced by BOOST_AUTO_TEST_CASE(), and extract_parameters().
InputIterator websocketpp::http::parser::extract_parameters | ( | InputIterator | begin, |
InputIterator | end, | ||
parameter_list & | parameters | ||
) |
Extract HTTP parameters.
An http parameters list is a comma delimited list of tokens followed by optional semicolon delimited attributes lists.
Parameters extracted are appended to the supplied parameters list parameters
.
[in] | begin | An iterator to the beginning of the sequence |
[in] | end | An iterator to the end of the sequence |
[out] | parameters | A reference to the parameters list to append paramter values extracted to |
Definition at line 293 of file parser.hpp.
References extract_all_lws(), extract_attributes(), and extract_token().
Referenced by BOOST_AUTO_TEST_CASE(), and websocketpp::http::parser::parser::parse_parameter_list().
|
inline |
Definition at line 379 of file parser.hpp.
References extract_all_lws().
Referenced by BOOST_AUTO_TEST_CASE(), and websocketpp::http::parser::parser::process_header().