OSDN Git Service

Correct that a status message is not captured.
authorAiwota Programmer <aiwotaprog@tetteke.tk>
Sun, 28 Jun 2009 12:54:31 +0000 (21:54 +0900)
committerAiwota Programmer <aiwotaprog@tetteke.tk>
Sun, 28 Jun 2009 12:56:06 +0000 (21:56 +0900)
src/http_client.cxx

index 3fbc4bf..f75afac 100644 (file)
@@ -126,9 +126,8 @@ void AsyncClient::handle_read_status_line(
 
   stream >> http_version_;
   stream >> status_code_;
-
-  std::string status_message_;
   std::getline(stream, status_message_);
+  boost::algorithm::trim(status_message_);
 
   if (!stream || !boost::algorithm::starts_with(http_version_, "HTTP/")) {
     std::cerr << "response is not HTTP" << std::endl;