hublist are getting bigger and bigger each years and more users use those lists.
to solve some bandwidth (hits) problems, i tough of distributing the loads to other puters.
but this is impossible with the way DC++ fletch the hublist currently.
what is needed, is to be able to get DC++ follow url redirection when DC is told to do so.
or meabe there is an other way around?
hublist url redirection
Moderator: Moderators
Code: Select all
[21:34] *** Connecting to hublist.no-ip.org...
[21:34] *** Connected
[21:34] <HubList> This Public Hublist is running version 0.1.2 alpha of HublistServer (RunTime:4days 7h 18min).
[21:34] <HubList> Sorry, the Public List is full, try again later...
[21:34] *** Disconnected
[21:34] *** Connecting to www.1stleg.com...
[21:34] *** Connected
[21:34] <HubList> Sorry, hublist full...
[21:34] *** Disconnected
With the current system, users have to manually add several hublist addresses, so if the first one fails, then it will try the next after the user hits Refresh. Redirects would avoid all the manual copy/pasting and clicking. I think I like your idea. But I'm gonna hazard a guess that it would take some serious changes to the way hublists are retreived in order to implement it.
it even worked that well that when people were requesting a bz2 list from neomodus (that does not exist) they were getting a hublist, be it a load of garbage though (the 404 contents which included a pipe here and there)-- 0.241 2003-04-01 --
* Added support for "302 file moved" for hublist downloads (thanks sedulus/sandos)
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
Code: Select all
if(aLine.find("200") == string::npos) {
if(aLine.find("302") != string::npos){
moved302 = true;
} else {
Code: Select all
} else if(moved302 && aLine.find("Location") != string::npos){
dcassert(socket);
socket->removeListener(this);
socket->disconnect();
BufferedSocket::putSocket(socket);
socket = NULL;
string location302 = aLine.substr(10, aLine.length() - 11);
// make sure we can also handle redirects with relative paths
if(Util::strnicmp(location302.c_str(), "http://", 7) != 0) {
if(location302[0] == '/') {
Util::decodeUrl(currentUrl, server, port, file);
string tmp = "http://" + server;
if(port != 80)
tmp += ':' + Util::toString(port);
location302 = tmp + location302;
} else {
string::size_type i = currentUrl.rfind('/');
dcassert(i != string::npos);
location302 = currentUrl.substr(0, i + 1) + location302;
}
}
fire(HttpConnectionListener::REDIRECTED, this, location302);
downloadFile(location302);
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)