merged fixes from RC_0_16

This commit is contained in:
Arvid Norberg 2013-11-01 09:05:41 +00:00
parent 73d9b3f51d
commit b9293058bd
3 changed files with 9 additions and 3 deletions

View File

@ -25,6 +25,8 @@
* fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP
* fix potential integer overflow issue in timers on windows
* minor fix to peer_proportional mixed_mode algorithm (TCP limit could go too low)
* graceful pause fix
* i2p fixes
* fix issue when loading certain malformed .torrent files

View File

@ -171,9 +171,13 @@ void http_connection::get(std::string const& url, time_duration timeout, int pri
if (ps->type == proxy_settings::http_pw)
APPEND_FMT1("Proxy-Authorization: Basic %s\r\n", base64encode(
ps->username + ":" + ps->password).c_str());
APPEND_FMT1("Host: %s", hostname.c_str());
hostname = ps->hostname;
port = ps->port;
APPEND_FMT1("Host: %s", hostname.c_str());
if (port != default_port) APPEND_FMT1(":%d\r\n", port);
else APPEND_FMT("\r\n");
}
else
{

View File

@ -190,12 +190,12 @@ namespace libtorrent
int total_seconds(time_duration td)
{
return int(performance_counter_to_microseconds(td.diff)
return boost::int64_t(performance_counter_to_microseconds(td.diff)
/ 1000000);
}
int total_milliseconds(time_duration td)
{
return int(performance_counter_to_microseconds(td.diff)
return boost::uint64_t(performance_counter_to_microseconds(td.diff)
/ 1000);
}
boost::int64_t total_microseconds(time_duration td)