diff options
Diffstat (limited to 'src/HttpResponseCommand.cc')
| -rw-r--r-- | src/HttpResponseCommand.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc index 05a50e36..f410adfe 100644 --- a/src/HttpResponseCommand.cc +++ b/src/HttpResponseCommand.cc @@ -245,6 +245,9 @@ bool HttpResponseCommand::handleDefaultEncoding _requestGroup->loadAndOpenFile(infoFile); File file(_requestGroup->getFirstFilePath()); + // We have to make sure that command that has Request object must + // have segment after PieceStorage is initialized. See + // AbstractCommand::execute() SharedHandle<Segment> segment = _requestGroup->getSegmentMan()->getSegment(cuid, 0); // pipelining requires implicit range specified. But the request for @@ -348,6 +351,11 @@ bool HttpResponseCommand::handleOtherEncoding poolConnection(); return true; } + // We have to make sure that command that has Request object must + // have segment after PieceStorage is initialized. See + // AbstractCommand::execute() + _requestGroup->getSegmentMan()->getSegment(cuid, 0); + e->commands.push_back (createHttpDownloadCommand(httpResponse, getTransferEncodingDecoder(httpResponse), |
