From 9c7e0576bd876b073b0ca170ac7ff9c3284815cd Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 20 Feb 2007 17:38:07 +0000 Subject: [PATCH] improved verbose logging of http seed connections --- ChangeLog | 2 ++ src/http_tracker_connection.cpp | 2 +- src/web_peer_connection.cpp | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 76953f027..f65724a9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. * made the DHT to only be used as a fallback to trackers by default. * added support for HTTP redirection support for web seeds. diff --git a/src/http_tracker_connection.cpp b/src/http_tracker_connection.cpp index 02b293f9c..1618d3dc2 100755 --- a/src/http_tracker_connection.cpp +++ b/src/http_tracker_connection.cpp @@ -146,7 +146,7 @@ namespace libtorrent if (m_protocol.substr(0, 5) != "HTTP/") { throw std::runtime_error("unknown protocol in HTTP response: " - + m_protocol); + + m_protocol + " line: " + std::string(pos, newline)); } line >> m_status_code; std::getline(line, m_server_message); diff --git a/src/web_peer_connection.cpp b/src/web_peer_connection.cpp index 4d907387b..29daa164d 100755 --- a/src/web_peer_connection.cpp +++ b/src/web_peer_connection.cpp @@ -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()); }