diff --git a/ChangeLog b/ChangeLog index 33fa648f1..cd83b28c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -59,6 +59,7 @@ release 0.14.2 * fixed mapped files bug where it wouldn't be properly restored from resume data properly * removed locale dependency in xml parser (caused asserts on windows) + * fixed bug when talking to https 1.0 servers release 0.14.1 diff --git a/src/http_connection.cpp b/src/http_connection.cpp index cda88d8dd..3aa469859 100644 --- a/src/http_connection.cpp +++ b/src/http_connection.cpp @@ -409,8 +409,11 @@ void http_connection::on_read(error_code const& e TORRENT_ASSERT(m_download_quota >= 0); } - if (e == asio::error::eof) + // when using the asio SSL wrapper, it seems like + // we get the shut_down error instead of EOF + if (e == asio::error::eof || e == asio::error::shut_down) { + error_code ec = asio::error::eof; TORRENT_ASSERT(bytes_transferred == 0); char const* data = 0; std::size_t size = 0; @@ -419,7 +422,7 @@ void http_connection::on_read(error_code const& e data = m_parser.get_body().begin; size = m_parser.get_body().left(); } - callback(e, data, size); + callback(ec, data, size); close(); return; }