forked from premiere/premiere-libtorrent
correctly URL encode the IPv6 argument to trackers
This commit is contained in:
parent
dec8c853e3
commit
08c05b9693
|
@ -1,3 +1,4 @@
|
|||
* correctly URL encode the IPv6 argument to trackers
|
||||
* fix default file pool size on windows
|
||||
* fix bug where settings_pack::file_pool_size setting was not being honored
|
||||
* add feature to periodically close files (to make windows clear disk cache)
|
||||
|
|
|
@ -744,6 +744,9 @@ TORRENT_TEST(tracker_ipv6_argument)
|
|||
std::string::size_type pos = req.find("&ipv6=");
|
||||
TEST_CHECK(pos != std::string::npos);
|
||||
got_ipv6 = pos != std::string::npos;
|
||||
// make sure the IPv6 argument is url encoded
|
||||
TEST_CHECK(req.substr(pos + 6, req.find_first_of(pos + 6, '&'))
|
||||
== "ffff%3a%3a1337");
|
||||
return sim::send_response(200, "OK", 11) + "d5:peers0:e";
|
||||
}
|
||||
, [](torrent_handle h) {}
|
||||
|
|
|
@ -194,7 +194,7 @@ namespace libtorrent
|
|||
if (!err)
|
||||
{
|
||||
url += "&ipv6=";
|
||||
url += ip;
|
||||
url += escape_string(ip.c_str(), ip.size());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue