OSDN Git Service

Correct that the head of downloaded contents is not captured.
authorAiwota Programmer <aiwotaprog@tetteke.tk>
Sun, 28 Jun 2009 20:04:32 +0000 (05:04 +0900)
committerAiwota Programmer <aiwotaprog@tetteke.tk>
Sun, 28 Jun 2009 20:04:32 +0000 (05:04 +0900)
src/http_client.cxx

index f75afac..a4301f4 100644 (file)
@@ -149,6 +149,7 @@ void AsyncClient::handle_read_headers(const boost::system::error_code& err) {
   std::string line;
   while (std::getline(stream, line)) {
     boost::algorithm::trim_right(line);
+    if (line.empty()) break;
     response_header_.set_header_from_line(line);
   }