mirror of https://github.com/aria2/aria2
2009-07-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated doc: TODO1.5 -> TODO * src/FileEntry.cc * src/HttpResponseCommand.ccpull/1/head
parent
eafa19748e
commit
8661bc049a
|
@ -1,3 +1,9 @@
|
||||||
|
2009-07-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Updated doc: TODO1.5 -> TODO
|
||||||
|
* src/FileEntry.cc
|
||||||
|
* src/HttpResponseCommand.cc
|
||||||
|
|
||||||
2009-07-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2009-07-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Added assertion fileEntries.size() == 1 if BitTorrent is not
|
Added assertion fileEntries.size() == 1 if BitTorrent is not
|
||||||
|
|
|
@ -107,7 +107,7 @@ template<typename InputIterator>
|
||||||
static bool inFlightHost(InputIterator first, InputIterator last,
|
static bool inFlightHost(InputIterator first, InputIterator last,
|
||||||
const std::string& hostname)
|
const std::string& hostname)
|
||||||
{
|
{
|
||||||
// TODO1.5 redirection should be considered here. We need to parse
|
// TODO redirection should be considered here. We need to parse
|
||||||
// original URI to get hostname.
|
// original URI to get hostname.
|
||||||
for(; first != last; ++first) {
|
for(; first != last; ++first) {
|
||||||
if((*first)->getHost() == hostname) {
|
if((*first)->getHost() == hostname) {
|
||||||
|
@ -170,12 +170,12 @@ FileEntry::findFasterRequest(const SharedHandle<Request>& base)
|
||||||
return SharedHandle<Request>();
|
return SharedHandle<Request>();
|
||||||
}
|
}
|
||||||
const SharedHandle<PeerStat>& basestat = base->getPeerStat();
|
const SharedHandle<PeerStat>& basestat = base->getPeerStat();
|
||||||
// TODO1.5 hard coded value. See PREF_STARTUP_IDLE_TIME
|
// TODO hard coded value. See PREF_STARTUP_IDLE_TIME
|
||||||
const int startupIdleTime = 10;
|
const int startupIdleTime = 10;
|
||||||
if(basestat.isNull() ||
|
if(basestat.isNull() ||
|
||||||
(basestat->getDownloadStartTime().elapsed(startupIdleTime) &&
|
(basestat->getDownloadStartTime().elapsed(startupIdleTime) &&
|
||||||
fastest->getAvgDownloadSpeed()*0.8 > basestat->calculateDownloadSpeed())){
|
fastest->getAvgDownloadSpeed()*0.8 > basestat->calculateDownloadSpeed())){
|
||||||
// TODO1.5 we should consider that "fastest" is very slow.
|
// TODO we should consider that "fastest" is very slow.
|
||||||
SharedHandle<Request> fastestRequest = _requestPool.front();
|
SharedHandle<Request> fastestRequest = _requestPool.front();
|
||||||
_requestPool.pop_front();
|
_requestPool.pop_front();
|
||||||
return fastestRequest;
|
return fastestRequest;
|
||||||
|
|
|
@ -122,7 +122,7 @@ bool HttpResponseCommand::executeInternal()
|
||||||
return skipResponseBody(httpResponse);
|
return skipResponseBody(httpResponse);
|
||||||
}
|
}
|
||||||
if(!_fileEntry->isSingleHostMultiConnectionEnabled()) {
|
if(!_fileEntry->isSingleHostMultiConnectionEnabled()) {
|
||||||
// TODO1.5 redirection should be considered here. We need to parse
|
// TODO redirection should be considered here. We need to parse
|
||||||
// original URI to get hostname.
|
// original URI to get hostname.
|
||||||
_fileEntry->removeURIWhoseHostnameIs(req->getHost());
|
_fileEntry->removeURIWhoseHostnameIs(req->getHost());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue