36 #include <boost/spirit/include/qi.hpp>
43 aStr <<
" > method = " << aHttpResponse.
method <<
"\n";
44 aStr <<
" > version = " << aHttpResponse.
version <<
"\n";
45 aStr <<
" > status = " << aHttpResponse.
status <<
"\n";
46 aStr <<
" > status_string = " << aHttpResponse.
status_string <<
"\n";
47 aStr <<
" > NameValuePairs =\n" << aHttpResponse.
headers <<
"\n";
48 aStr <<
" > Content =\n";
50 for ( std::vector<uint8_t>::const_iterator lIt = aHttpResponse.
content.begin() ; lIt != aHttpResponse.
content.end() ; ++lIt )
52 aStr << char ( *lIt );
67 HttpResponseGrammar::HttpResponseGrammar() :
68 HttpResponseGrammar::base_type ( response )
70 using namespace boost::spirit;
71 response = + ( qi::char_ - qi::lit (
"/" ) ) >> qi::lit (
"/" ) >> double_ >> int_ >> nonewline_sequence >> noblankline_sequence >> qi::lexeme[ * ( qi::char_ ) ] ;
72 nospace_sequence = qi::lexeme[ + ( qi::char_ -
" " ) >
" " ];
73 nonewline_sequence = qi::lexeme[ + ( qi::char_ -
"\r\n" ) >> -qi::lit (
"\r\n" ) ];
74 noblankline_sequence = qi::lexeme[ + ( qi::char_ -
"\r\n\r\n" ) >> -qi::lit (
"\r\n\r\n" ) ];