Skip to content

Commit

Permalink
2010-10-31 Tatsuhiro Tsujikawa <[email protected]>
Browse files Browse the repository at this point in the history
	Fixed the bug that downloading > 4GB file fails on 32bit systems.
	* src/HttpRequest.cc
	* src/HttpRequestCommand.cc
  • Loading branch information
tatsuhiro-t committed Oct 31, 2010
1 parent 236e64c commit 6e88cae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2010-10-31 Tatsuhiro Tsujikawa <[email protected]>

Fixed the bug that downloading > 4GB file fails on 32bit systems.
* src/HttpRequest.cc
* src/HttpRequestCommand.cc

2010-10-30 Tatsuhiro Tsujikawa <[email protected]>

Use unnamed namespace instead of static keyword.
Expand Down
2 changes: 1 addition & 1 deletion src/HttpRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ HttpRequest::HttpRequest():contentEncodingEnabled_(true),
userAgent_(USER_AGENT),
noCache_(true),
acceptGzip_(false),
endOffsetOverride_(false)
endOffsetOverride_(0)
{}

void HttpRequest::setSegment(const SharedHandle<Segment>& segment)
Expand Down
3 changes: 2 additions & 1 deletion src/HttpRequestCommand.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ bool HttpRequestCommand::executeInternal() {
getPieceStorage()->getNextUsedIndex(segment->getIndex());
endOffset = std::min
(static_cast<off_t>(getFileEntry()->getLength()),
getFileEntry()->gtoloff(segment->getSegmentLength()*nextIndex));
getFileEntry()->gtoloff
(static_cast<off_t>(segment->getSegmentLength())*nextIndex));
}
SharedHandle<HttpRequest> httpRequest
(createHttpRequest(getRequest(),
Expand Down

0 comments on commit 6e88cae

Please sign in to comment.