summaryrefslogtreecommitdiff
path: root/src/HttpResponseCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-09-06 14:52:19 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-09-06 14:52:19 +0000
commitf5b3a820ef7390c82f2f240aebb8b40ee7a63b7d (patch)
treeed542b15c440f2b3d14704ffc4c18c6a3e20410d /src/HttpResponseCommand.cc
parentefbfe4c006cfb6e0bf3ee4ed57d0657c0cd85c19 (diff)
2010-09-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Parse original URI when removing same host. * src/HttpResponseCommand.cc
Diffstat (limited to 'src/HttpResponseCommand.cc')
-rw-r--r--src/HttpResponseCommand.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc
index bfa67430..ce300369 100644
--- a/src/HttpResponseCommand.cc
+++ b/src/HttpResponseCommand.cc
@@ -151,9 +151,11 @@ bool HttpResponseCommand::executeInternal()
return skipResponseBody(httpResponse);
}
if(getFileEntry()->isUniqueProtocol()) {
- // TODO redirection should be considered here. We need to parse
+ // Redirection should be considered here. We need to parse
// original URI to get hostname.
- getFileEntry()->removeURIWhoseHostnameIs(getRequest()->getHost());
+ Request req;
+ req.setUri(getRequest()->getUri());
+ getFileEntry()->removeURIWhoseHostnameIs(req.getHost());
}
if(getPieceStorage().isNull()) {
uint64_t totalLength = httpResponse->getEntityLength();