improved verbose logging of http seed connections

This commit is contained in:
Arvid Norberg 2007-02-20 17:38:07 +00:00
parent df46401c9c
commit 9c7e0576bd
3 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,5 @@
* added python binding, using boost.python
* improved character conversion on windows when strings are not utf-8.
* metadata extension now respects the private flag in the torrent. * metadata extension now respects the private flag in the torrent.
* made the DHT to only be used as a fallback to trackers by default. * made the DHT to only be used as a fallback to trackers by default.
* added support for HTTP redirection support for web seeds. * added support for HTTP redirection support for web seeds.

View File

@ -146,7 +146,7 @@ namespace libtorrent
if (m_protocol.substr(0, 5) != "HTTP/") if (m_protocol.substr(0, 5) != "HTTP/")
{ {
throw std::runtime_error("unknown protocol in HTTP response: " throw std::runtime_error("unknown protocol in HTTP response: "
+ m_protocol); + m_protocol + " line: " + std::string(pos, newline));
} }
line >> m_status_code; line >> m_status_code;
std::getline(line, m_server_message); std::getline(line, m_server_message);

View File

@ -260,6 +260,10 @@ namespace libtorrent
} }
} }
#ifdef TORRENT_VERBOSE_LOGGING
(*m_logger) << request << "\n";
#endif
send_buffer(request.c_str(), request.c_str() + request.size()); send_buffer(request.c_str(), request.c_str() + request.size());
} }