diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-09-06 14:52:19 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-09-06 14:52:19 +0000 |
| commit | f5b3a820ef7390c82f2f240aebb8b40ee7a63b7d (patch) | |
| tree | ed542b15c440f2b3d14704ffc4c18c6a3e20410d /src/HttpResponseCommand.cc | |
| parent | efbfe4c006cfb6e0bf3ee4ed57d0657c0cd85c19 (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.cc | 6 |
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(); |
