Added max-connection-per-server, min-split-size and
conditional-get option to -i list option and aria2rpc.
* doc/aria2c.1.txt
* doc/xmlrpc/aria2rpc
* src/download_helper.cc
Count the number of command used in HTTP(S)/FTP and the number of
connections in HTTP(S)/FTP independently. The former is used to
determin whether additional command is needed. The latter is used
to report user to how many connections are used in a download.
* src/AbstractCommand.cc
* src/AbstractCommand.h
* src/CreateRequestCommand.cc
* src/RequestGroup.cc
* src/RequestGroup.h
Added --on-bt-download-complete=COMMAND option. For BitTorrent, a
command specified in --on-download-complete is called when
download completes and seeding is over. On the other hand, this
option set the command to be executed when download completes but
before seeding.
* doc/aria2c.1.txt
* src/DefaultPieceStorage.cc
* src/OptionHandlerFactory.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* src/util.cc
* src/util.h
Added --conditional-get option. Download file only when the local
file is older than remote file. This function only works with
HTTP(S) downloads only. It does not work if file size is specified
in Metalink. It also ignores Content-Disposition header. If a
control file exists, this option will be ignored. This function
uses If-Modified-Since header to get only newer file
conditionally. When getting modification time of local file, it
uses user supplied filename(see --out option) or filename part in
URI if --out is not specified.
* doc/aria2c.1.txt
* src/HttpHeader.cc
* src/HttpHeader.h
* src/HttpRequest.cc
* src/HttpRequest.h
* src/HttpRequestCommand.cc
* src/HttpResponse.cc
* src/HttpResponseCommand.cc
* src/OptionHandlerFactory.cc
* src/TimeA2.cc
* src/TimeA2.h
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/HttpResponseTest.cc
* test/TimeTest.cc
Added --min-split-size=SIZE option. aria2 does not split less
than 2*SIZE byte range. For example, let's consider downloading
20MiB file. If SIZE is 10M, aria2 can split file into 2 range
[0-10MiB) and [10MiB-20MiB) and download it using 2 sources(if
--split >= 2, of course). If SIZE is 15M, since 2*15M > 20MiB,
aria2 does not split file and download it using 1 source.
* src/BitfieldMan.cc
* src/BitfieldMan.h
* src/DefaultPieceStorage.cc
* src/DefaultPieceStorage.h
* src/OptionHandlerFactory.cc
* src/RequestGroup.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/BitfieldManTest.cc
* test/SegmentManTest.cc
FeedbackURISelector now tries to chooses URI which is not used in
aria2 globally. If it is possible, it may return used URI.
* src/AdaptiveURISelector.cc
* src/AdaptiveURISelector.h
* src/CreateRequestCommand.cc
* src/FeedbackURISelector.cc
* src/FeedbackURISelector.h
* src/FileEntry.cc
* src/FileEntry.h
* src/InOrderURISelector.cc
* src/InOrderURISelector.h
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/URISelector.h
* test/FeedbackURISelectorTest.cc
* test/InOrderURISelectorTest.cc
Added --max-connection-per-server=NUM option. The default value of
NUM is 1. This option limits the number of connections allowed to
one server for each download. This means when NUM is 2 and 1 URI
is provided, even if you specified -s 5, aria2 establishes 2
connections. Default value of -j option is changed from 5 to 2.
* src/BtDependency.cc
* src/CreateRequestCommand.cc
* src/FileEntry.cc
* src/FileEntry.h
* src/FtpNegotiationCommand.cc
* src/HttpResponseCommand.cc
* src/Metalink2RequestGroup.cc
* src/OptionHandlerFactory.cc
* src/TrackerWatcherCommand.cc
* src/download_helper.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/DownloadHelperTest.cc
* test/FileEntryTest.cc
Set end byte in Range header if start byte > 0 to get more chance
to pool socket.
* src/DefaultPieceStorage.cc
* src/DefaultPieceStorage.h
* src/DownloadCommand.cc
* src/HttpDownloadCommand.cc
* src/HttpRequest.cc
* src/HttpRequest.h
* src/HttpRequestCommand.cc
* src/PieceStorage.h
* src/UnknownLengthPieceStorage.h
* test/DefaultPieceStorageTest.cc
* test/HttpRequestTest.cc
* test/MockPieceStorage.h
Fixed the bug that segments are not filled to
Request::getMaxPipelinedRequest().
Make sure that trailing data of transfer encoding is read propery,
after file data is received.
* src/AbstractCommand.cc
* src/DownloadCommand.cc
* src/DownloadCommand.h
* src/FtpDownloadCommand.cc
* src/FtpDownloadCommand.h
* src/HttpDownloadCommand.cc
* src/HttpDownloadCommand.h
Fixed the bug that DownloadContext::resetDownloadStartTime() never
be called in downloads whose total length is unknown. This causes
avg speed in Download Results is always 0 for these downloads.
* src/RequestGroup.cc
* src/BtFileAllocationEntry.cc
* src/StreamFileAllocationEntry.cc
Fixed the bug that AdaptiveFileAllocationIterator::finished()
returns false even if offset_ >= totalLength_. This causes
ftruncate error for seeding torrents.
* src/AdaptiveFileAllocationIterator.cc
Send each CWD component of FTP URI in separate CWD command as
described in RFC1738.
* src/FtpConnection.cc
* src/FtpConnection.h
* src/FtpInitiateConnectionCommand.cc
* src/FtpNegotiationCommand.cc
* src/FtpNegotiationCommand.h
* test/FtpConnectionTest.cc
Fixed the bug that aria2 cannot handle %2F in FTP URI properly.
If directory component starts with %2F which percent-encode of
'/', client should issue CWD to absolute path, but aria2 does not
do that. It just issues relative path and download fails.
* src/FtpConnection.cc
* test/FtpConnectionTest.cc
When allocating disk space, for Linux system with fallocate()
system call, first check file system supports fallocate. This
just run fallocate with small chunk and see it succeeds or fails.
If it succeeds, use fallocate() to allocate entire file otherwise
fall back to traditional slower method: writing zeros. This
behavior is enabled in --file-allocation=prealloc, so this is
enabled by default for most modern Linux.
* configure.ac
* src/AbstractDiskWriter.cc
* src/AbstractDiskWriter.h
* src/AbstractSingleDiskAdaptor.cc
* src/AdaptiveFileAllocationIterator.cc
* src/AdaptiveFileAllocationIterator.h
* src/DefaultPieceStorage.cc
* src/DiskAdaptor.cc
* src/DiskAdaptor.h
* src/FallocFileAllocationIterator.cc
* src/Makefile.am
* src/MultiFileAllocationIterator.cc
* src/OptionHandlerFactory.cc
* test/FallocFileAllocationIteratorTest.cc
* test/Makefile.am