summaryrefslogtreecommitdiff
path: root/src/HttpResponseCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-06-29 16:43:41 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-06-29 16:43:41 +0000
commitcece2bc896b941d0c9b9d441460b5d32989268bd (patch)
treeff5348711867e2cb2cd753d7e2549a20a201675f /src/HttpResponseCommand.cc
parentc4d79d7160569bef82c4a67b267d78289b91e449 (diff)
2009-06-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed ServerHost. Same functionality is implemented using FileEntry's in-flight Request objects. * src/AbstractCommand.cc * src/BtDependency.cc * src/CreateRequestCommand.cc * src/FileEntry.cc * src/FileEntry.h * src/FtpNegotiationCommand.cc * src/HttpResponseCommand.cc * src/Makefile.am * src/Metalink2RequestGroup.cc * src/RequestGroup.cc * src/RequestGroup.h * src/ServerHost.cc: Removed * src/ServerHost.h: Removed * test/BtDependencyTest.cc * test/FileEntryTest.cc * test/RequestGroupTest.cc
Diffstat (limited to 'src/HttpResponseCommand.cc')
-rw-r--r--src/HttpResponseCommand.cc17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc
index 4b4d8080..5bc6229b 100644
--- a/src/HttpResponseCommand.cc
+++ b/src/HttpResponseCommand.cc
@@ -37,7 +37,6 @@
#include "DownloadContext.h"
#include "FileEntry.h"
#include "RequestGroup.h"
-#include "ServerHost.h"
#include "RequestGroupMan.h"
#include "Request.h"
#include "HttpRequest.h"
@@ -122,18 +121,10 @@ bool HttpResponseCommand::executeInternal()
}
return skipResponseBody(httpResponse);
}
- if(!_requestGroup->isSingleHostMultiConnectionEnabled()) {
- // Query by hostname. Searching by CUID may returns NULL. In case
- // when resuming download, ServerHost is registered with CUID A.
- // Then if requested range is not equal to saved one,
- // StreamFileAllocationEntry is created with _nextCommand NULL.
- // This results creating new command CUID, say B and same URI. So
- // searching ServerHost by CUID B fails.
- SharedHandle<ServerHost> sv =
- _requestGroup->searchServerHost(req->getHost());
- if(!sv.isNull()) {
- _fileEntry->removeURIWhoseHostnameIs(sv->getHostname());
- }
+ if(!_fileEntry->isSingleHostMultiConnectionEnabled()) {
+ // TODO1.5 redirection should be considered here. We need to parse
+ // original URI to get hostname.
+ _fileEntry->removeURIWhoseHostnameIs(req->getHost());
}
if(_requestGroup->getPieceStorage().isNull()) {
uint64_t totalLength = httpResponse->getEntityLength();