mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 05:27:38 +03:00
Use standard percent-encode for tracker request query
This commit is contained in:
parent
0b906f40f1
commit
c57259f8e7
2 changed files with 40 additions and 41 deletions
|
@ -161,8 +161,7 @@ std::string DefaultBtAnnounce::getAnnounceUrl()
|
||||||
const size_t keyLen = 8;
|
const size_t keyLen = 8;
|
||||||
std::string uri = announceList_.getAnnounce();
|
std::string uri = announceList_.getAnnounce();
|
||||||
uri += uriHasQuery(uri) ? "&" : "?";
|
uri += uriHasQuery(uri) ? "&" : "?";
|
||||||
uri +=
|
uri += fmt("info_hash=%s&"
|
||||||
fmt("info_hash=%s&"
|
|
||||||
"peer_id=%s&"
|
"peer_id=%s&"
|
||||||
"uploaded=%" PRId64 "&"
|
"uploaded=%" PRId64 "&"
|
||||||
"downloaded=%" PRId64 "&"
|
"downloaded=%" PRId64 "&"
|
||||||
|
@ -171,12 +170,12 @@ std::string DefaultBtAnnounce::getAnnounceUrl()
|
||||||
"key=%s&"
|
"key=%s&"
|
||||||
"numwant=%d&"
|
"numwant=%d&"
|
||||||
"no_peer_id=1",
|
"no_peer_id=1",
|
||||||
util::torrentPercentEncode(bittorrent::getInfoHash(downloadContext_),
|
util::percentEncode(bittorrent::getInfoHash(downloadContext_),
|
||||||
INFO_HASH_LENGTH).c_str(),
|
INFO_HASH_LENGTH).c_str(),
|
||||||
util::torrentPercentEncode(bittorrent::getStaticPeerId(),
|
util::percentEncode(bittorrent::getStaticPeerId(), PEER_ID_LENGTH)
|
||||||
PEER_ID_LENGTH).c_str(),
|
.c_str(),
|
||||||
stat.getSessionUploadLength(), stat.getSessionDownloadLength(), left,
|
stat.getSessionUploadLength(), stat.getSessionDownloadLength(),
|
||||||
util::torrentPercentEncode(bittorrent::getStaticPeerId() +
|
left, util::percentEncode(bittorrent::getStaticPeerId() +
|
||||||
PEER_ID_LENGTH - keyLen,
|
PEER_ID_LENGTH - keyLen,
|
||||||
keyLen).c_str(),
|
keyLen).c_str(),
|
||||||
numWant);
|
numWant);
|
||||||
|
@ -190,7 +189,7 @@ std::string DefaultBtAnnounce::getAnnounceUrl()
|
||||||
}
|
}
|
||||||
if (!trackerId_.empty()) {
|
if (!trackerId_.empty()) {
|
||||||
uri += "&trackerid=";
|
uri += "&trackerid=";
|
||||||
uri += util::torrentPercentEncode(trackerId_);
|
uri += util::percentEncode(trackerId_);
|
||||||
}
|
}
|
||||||
if (option_->getAsBool(PREF_BT_FORCE_ENCRYPTION) ||
|
if (option_->getAsBool(PREF_BT_FORCE_ENCRYPTION) ||
|
||||||
option_->getAsBool(PREF_BT_REQUIRE_CRYPTO)) {
|
option_->getAsBool(PREF_BT_REQUIRE_CRYPTO)) {
|
||||||
|
|
|
@ -158,7 +158,7 @@ void DefaultBtAnnounceTest::testNoMoreAnnounce()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost/"
|
std::string("http://localhost/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -169,7 +169,7 @@ void DefaultBtAnnounceTest::testNoMoreAnnounce()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost/"
|
std::string("http://localhost/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&supportcrypto=1"),
|
"numwant=50&no_peer_id=1&port=6989&supportcrypto=1"),
|
||||||
btAnnounce.getAnnounceUrl());
|
btAnnounce.getAnnounceUrl());
|
||||||
|
@ -179,7 +179,7 @@ void DefaultBtAnnounceTest::testNoMoreAnnounce()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://backup/"
|
std::string("http://backup/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -192,7 +192,7 @@ void DefaultBtAnnounceTest::testNoMoreAnnounce()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost/"
|
std::string("http://localhost/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&event=completed&"
|
"numwant=50&no_peer_id=1&port=6989&event=completed&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -203,7 +203,7 @@ void DefaultBtAnnounceTest::testNoMoreAnnounce()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://backup/"
|
std::string("http://backup/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&event=completed&"
|
"numwant=50&no_peer_id=1&port=6989&event=completed&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -216,7 +216,7 @@ void DefaultBtAnnounceTest::testNoMoreAnnounce()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost/"
|
std::string("http://localhost/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=0&no_peer_id=1&port=6989&event=stopped&"
|
"numwant=0&no_peer_id=1&port=6989&event=stopped&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -227,7 +227,7 @@ void DefaultBtAnnounceTest::testNoMoreAnnounce()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://backup/"
|
std::string("http://backup/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=0&no_peer_id=1&port=6989&event=stopped&"
|
"numwant=0&no_peer_id=1&port=6989&event=stopped&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -255,7 +255,7 @@ void DefaultBtAnnounceTest::testGetAnnounceUrl()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost/"
|
std::string("http://localhost/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -281,7 +281,7 @@ void DefaultBtAnnounceTest::testGetAnnounceUrl()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost/"
|
std::string("http://localhost/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&supportcrypto=1"),
|
"numwant=50&no_peer_id=1&port=6989&supportcrypto=1"),
|
||||||
btAnnounce.getAnnounceUrl());
|
btAnnounce.getAnnounceUrl());
|
||||||
|
@ -296,7 +296,7 @@ void DefaultBtAnnounceTest::testGetAnnounceUrl()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost/"
|
std::string("http://localhost/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&event=completed&"
|
"numwant=50&no_peer_id=1&port=6989&event=completed&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -312,7 +312,7 @@ void DefaultBtAnnounceTest::testGetAnnounceUrl()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost/"
|
std::string("http://localhost/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=0&no_peer_id=1&port=6989&event=stopped&"
|
"numwant=0&no_peer_id=1&port=6989&event=stopped&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -339,7 +339,7 @@ void DefaultBtAnnounceTest::testGetAnnounceUrl_withQuery()
|
||||||
std::string(
|
std::string(
|
||||||
"http://localhost/announce?k=v&"
|
"http://localhost/announce?k=v&"
|
||||||
"info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%01%23Eg&"
|
"info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%01%23Eg&"
|
||||||
"peer_id=%2Daria2%2Dultrafastdltl&"
|
"peer_id=-aria2-ultrafastdltl&"
|
||||||
"uploaded=1572864&downloaded=1310720&left=1572864&compact=1&"
|
"uploaded=1572864&downloaded=1310720&left=1572864&compact=1&"
|
||||||
"key=fastdltl&numwant=50&no_peer_id=1&port=6989&event=started&"
|
"key=fastdltl&numwant=50&no_peer_id=1&port=6989&event=started&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -364,7 +364,7 @@ void DefaultBtAnnounceTest::testGetAnnounceUrl_externalIP()
|
||||||
std::string(
|
std::string(
|
||||||
"http://localhost/announce?"
|
"http://localhost/announce?"
|
||||||
"info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%01%23Eg&"
|
"info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%01%23Eg&"
|
||||||
"peer_id=%2Daria2%2Dultrafastdltl&"
|
"peer_id=-aria2-ultrafastdltl&"
|
||||||
"uploaded=1572864&downloaded=1310720&left=1572864&compact=1&"
|
"uploaded=1572864&downloaded=1310720&left=1572864&compact=1&"
|
||||||
"key=fastdltl&numwant=50&no_peer_id=1&port=6989&event=started&"
|
"key=fastdltl&numwant=50&no_peer_id=1&port=6989&event=started&"
|
||||||
"supportcrypto=1&ip=192.168.1.1"),
|
"supportcrypto=1&ip=192.168.1.1"),
|
||||||
|
@ -395,7 +395,7 @@ void DefaultBtAnnounceTest::testIsAllAnnounceFailed()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost/"
|
std::string("http://localhost/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -406,7 +406,7 @@ void DefaultBtAnnounceTest::testIsAllAnnounceFailed()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://backup/"
|
std::string("http://backup/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -442,7 +442,7 @@ void DefaultBtAnnounceTest::testURLOrderInStoppedEvent()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost1/"
|
std::string("http://localhost1/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -455,7 +455,7 @@ void DefaultBtAnnounceTest::testURLOrderInStoppedEvent()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost1/"
|
std::string("http://localhost1/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=0&no_peer_id=1&port=6989&event=stopped&"
|
"numwant=0&no_peer_id=1&port=6989&event=stopped&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -466,7 +466,7 @@ void DefaultBtAnnounceTest::testURLOrderInStoppedEvent()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost2/"
|
std::string("http://localhost2/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=0&no_peer_id=1&port=6989&event=stopped&"
|
"numwant=0&no_peer_id=1&port=6989&event=stopped&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -494,7 +494,7 @@ void DefaultBtAnnounceTest::testURLOrderInCompletedEvent()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost1/"
|
std::string("http://localhost1/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
"numwant=50&no_peer_id=1&port=6989&event=started&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -507,7 +507,7 @@ void DefaultBtAnnounceTest::testURLOrderInCompletedEvent()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost1/"
|
std::string("http://localhost1/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&event=completed&"
|
"numwant=50&no_peer_id=1&port=6989&event=completed&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
@ -518,7 +518,7 @@ void DefaultBtAnnounceTest::testURLOrderInCompletedEvent()
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(
|
||||||
std::string("http://localhost2/"
|
std::string("http://localhost2/"
|
||||||
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
"announce?info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%"
|
||||||
"01%23Eg&peer_id=%2Daria2%2Dultrafastdltl&uploaded=1572864&"
|
"01%23Eg&peer_id=-aria2-ultrafastdltl&uploaded=1572864&"
|
||||||
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
"downloaded=1310720&left=1572864&compact=1&key=fastdltl&"
|
||||||
"numwant=50&no_peer_id=1&port=6989&event=completed&"
|
"numwant=50&no_peer_id=1&port=6989&event=completed&"
|
||||||
"supportcrypto=1"),
|
"supportcrypto=1"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue