summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--http_connection.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/http_connection.cpp b/http_connection.cpp
index e682037..0873985 100644
--- a/http_connection.cpp
+++ b/http_connection.cpp
@@ -62,10 +62,12 @@ void print(char c) {
}
bool HTTP::Connection::parse_request(boost::asio::streambuf& buf) {
- typedef boost::asio::buffers_iterator<boost::asio::streambuf::const_buffers_type> Iterator;
+ std::string data(boost::asio::buffers_begin(buf.data()), boost::asio::buffers_end(buf.data()));
- Iterator begin = Iterator::begin(buf.data());
- Iterator end = Iterator::end(buf.data());
+ typedef std::string::const_iterator Iterator;
+
+ Iterator begin = data.begin();
+ Iterator end = data.end();
qi::rule<Iterator, std::string()> word_p = +(qi::char_ - ' ' - '\r');