fixed bug when talking to https 1.0 servers

This commit is contained in:
Arvid Norberg 2009-02-11 07:54:16 +00:00
parent 48a509d25c
commit 90b3006d22
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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;
}