Added xml-rpc functionality. Currently only addURI commad is
supported. To enable xml-rpc, run aria2 with
--enable-http-server. This option name is temporal and will be
changed. The feature that reports download progress in html format
is temporarily disabled.
* src/HttpServer.cc
* src/HttpServer.h
* src/HttpServerBodyCommand.cc
* src/HttpServerBodyCommand.h
* src/HttpServerCommand.cc
* src/HttpServerResponseCommand.cc
* src/Makefile.am
* src/OptionParser.cc
* src/OptionParser.h
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/XmlRpcMethod.cc
* src/XmlRpcMethod.h
* src/XmlRpcMethodFactory.cc
* src/XmlRpcMethodFactory.h
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* src/download_helper.cc
* src/download_helper.h
* test/Makefile.am
* test/XmlRpcMethodTest.cc
Added static member _protocolFamily to SocketCore. By default,
SocketCore uses AF_UNSPEC for getaddrinfo hints to resolve
address. Sometime SocketCore::bind() and
SocketCore::establishConnection() use difference protocl family
and latter cannot connect to former. To avoid this situation, we
limit protocol family to AF_INET for unit tests.
* src/SocketCore.cc
* src/SocketCore.h
* test/AllTest.cc
In DefaultBtContext::getActualBasePath(), return first
FileEntry::getPath() for single file torrent.
* src/DefaultBtContext.cc
* test/DefaultBtContextTest.cc
Now the constructor of AbstractDiskWriter takes filename as an
argument and filename argument is removed from openFile(),
initAndOpenFile(), openExistingFile() interface. storeDir
member and its accessor functions are removed from DiskAdaptor
because it is not used anymore. size() member function of
DefaultDiskWriter, DirectDiskAdaptor and MultiDiskAdaptor now
can be called without opening file.
* src/AbstractDiskWriter.cc
* src/AbstractDiskWriter.h
* src/AbstractSingleDiskAdaptor.cc
* src/AbstractSingleDiskAdaptor.h
* src/ByteArrayDiskWriter.cc
* src/ByteArrayDiskWriter.h
* src/ByteArrayDiskWriterFactory.cc
* src/ByteArrayDiskWriterFactory.h
* src/DefaultDiskWriter.cc
* src/DefaultDiskWriter.h
* src/DefaultDiskWriterFactory.cc
* src/DefaultDiskWriterFactory.h
* src/DefaultPieceStorage.cc
* src/DirectDiskAdaptor.cc
* src/DirectDiskAdaptor.h
* src/DiskAdaptor.h
* src/DiskWriter.h
* src/DiskWriterFactory.h
* src/MessageDigestHelper.cc
* src/MultiDiskAdaptor.cc
* src/RequestGroup.cc
* src/UnknownLengthPieceStorage.cc
* src/Util.cc
* test/DefaultDiskWriterTest.cc
* test/DirectDiskAdaptorTest.cc
* test/FallocFileAllocationIteratorTest.cc
* test/MessageDigestHelperTest.cc
* test/MetalinkProcessorTest.cc
* test/MultiDiskAdaptorTest.cc
* test/MultiFileAllocationIteratorTest.cc
* test/SingleFileAllocationIteratorTest.cc
* test/UtilTest.cc
Fixed the bug that with --check-integrity option aria2 reports
downloaded file size is 0 even if some parts of file is
correctly downloaded. This bug is reproducible for the download
that a file includes last piece is missing. This bug doesn't
reveal for single-torrent with file allocation on.
* src/IteratableChecksumValidator.cc
* test/IteratableChecksumValidatorTest.cc
Removed MetalinkProcessorFactory. Since we don't use both
libxml2 and expat simultaneously, MetalinkProcessor is now not
base class and it is directly implemented in
XML2SAXMetalinkProcessor and ExpatMetalinkProcessor.
* src/ExpatMetalinkProcessor.cc
* src/ExpatMetalinkProcessor.h
* src/Makefile.am
* src/MetalinkHelper.cc
* src/MetalinkProcessor.h
* src/MetalinkProcessorFactory.cc: Removed.
* src/MetalinkProcessorFactory.h: Removed
* src/XML2SAXMetalinkProcessor.cc
* src/XML2SAXMetalinkProcessor.h
* test/MetalinkProcessorTest.cc
Use url-list (web-seeding) only for single-file torrent. This
is basically the same behavior with Metalink file with torrent
and URIs.
* src/RequestGroup.cc
* src/DefaultBtContext.cc
* test/DefaultBtContextTest.cc
Fixed the bug that prevents torrent download from finishing.
The bug doesn't reveal for all torrents. The torrents affected
this bug satisfies ((N+7)/8)%4 == 0 and N%32 != 0 where N is the
number of pieces.
* src/bitfield.h
* test/bitfieldTest.cc
Fixed segmentation fault when GZipDecoder::decode() returns 0
byte.
* src/DownloadCommand.cc
* src/bitfield.h
* test/bitfieldTest.cc
Fixed the bug that causes infinite loop if broken web server
returns chunked response without last "0" chunk-size marker and
closes connection.
* src/DownloadCommand.cc
Instantiate properly configured HttpDownloadCommand for
non-resumable downlaods.
* src/HttpResponseCommand.cc
Fixed the bug that removed peer's session upload/download length
are counted twice in _cachedTransferStat before it is
re-calculated. This affected the calculation of shara ratio,
resulting aria2 wrongly determines that specified share ratio is
reached. Also fixed the typo in calculateStatFor function name.
* src/BtSetup.cc
* src/DefaultPeerStorage.cc
* src/ShareRatioSeedCriteria.h
* test/ShareRatioSeedCriteriaTest.cc
BitfieldMan::getMissingIndexes family functions now takes
unsigned char* bitfield instead of stl container for efficiency.
PieceSelector::select now takes this
bitfield. RarestPieceSelector::select now also performs
efficiently for this change. bitfield namespace is introduced
and it has several helper functions to handle basic bitfield
operations such as test, count set bits, etc.
* src/BitfieldMan.cc
* src/BitfieldMan.h
* src/DefaultBtRequestFactory.cc
* src/DefaultPieceStorage.cc
* src/DefaultPieceStorage.h
* src/LongestSequencePieceSelector.cc
* src/LongestSequencePieceSelector.h
* src/Makefile.am
* src/Piece.cc
* src/Piece.h
* src/PieceSelector.h
* src/RarestPieceSelector.cc
* src/RarestPieceSelector.h
* src/Util.cc
* src/Util.h
* src/bitfield.h
* test/BitfieldManTest.cc
* test/LongestSequencePieceSelectorTest.cc
* test/Makefile.am
* test/RarestPieceSelectorTest.cc
* test/UtilTest.cc
* test/bitfieldTest.cc
Added 'falloc' parameter for --file-allocation option. 'falloc'
allocation mode uses posix_fallocate() system call to allocate
file on disk. If you are using newer file systems such as ext4
(with extents support), btrfs or xfs, 'falloc' is your best
choice. It allocates large(few GiB) files almost instantly.
Don't use 'falloc' with legacy file systems such as ext3 because
it takes almost same time as 'prealloc' and it blocks aria2
entirely until allocation finishes. 'falloc' may not be
available if your system doesn't have posix_fallocate() system
call.
* configure.ac
* src/AbstractDiskWriter.cc
* src/AbstractDiskWriter.h
* src/AbstractSingleDiskAdaptor.cc
* src/BinaryStream.h
* src/BtCheckIntegrityEntry.cc
* src/ByteArrayDiskWriter.h
* src/CheckIntegrityEntry.cc
* src/CheckIntegrityEntry.h
* src/DefaultPieceStorage.cc
* src/DiskAdaptor.cc
* src/DiskAdaptor.h
* src/DiskWriter.h
* src/FallocFileAllocationIterator.cc
* src/FallocFileAllocationIterator.h
* src/FileAllocationEntry.cc
* src/FileAllocationEntry.h
* src/Makefile.am
* src/MultiFileAllocationIterator.cc
* src/MultiFileAllocationIterator.h
* src/OptionHandlerFactory.cc
* src/RequestGroup.cc
* src/StreamCheckIntegrityEntry.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/FallocFileAllocationIteratorTest.cc
* test/Makefile.am
Replaced std::vector<SharedHandle<PieceStats> _sortedPieceStats
with std::vector<size_t> _sortedPieceStatIndexes to reduce the
cost of std::rotate().
* src/RarestPieceSelector.cc
* src/RarestPieceSelector.h
* test/RarestPieceSelectorTest.cc
Reduced the number of calls to PeerStorage::calculateStat() and
SegmentMan::calculateDownloadSpeed() to lower CPU usage on
higher transfer rate.
* src/DefaultBtInteractive.cc
* src/DefaultBtMessageDispatcher.cc
* src/DefaultPeerStorage.cc
* src/DefaultPeerStorage.h
* src/DownloadCommand.cc
* src/DownloadEngine.cc
* src/PeerStorage.h
* src/SegmentMan.cc
* src/SegmentMan.h
* test/MockPeerStorage.h
Added --index-out option to specify each file path for torrent.
Here index shown in --show-files option is used to specify which
file path should be altered. For example, to change the file
path with index=2, use --index-out=2=aria2.tar.bz2. You can use
this option multiple times: --index-out=1=aria2.tar.bz2
--index-out=2=aria2-opt.tar.bz2. The short hand form -O is also
available. This option can be specified in -i list.
* src/DefaultBtContext.cc
* src/DefaultBtContext.h
* src/MultiDiskAdaptor.cc
* src/MultiDiskAdaptor.h
* src/MultiFileAllocationIterator.cc
* src/OptionHandlerFactory.cc
* src/OptionHandlerImpl.h
* src/Util.cc
* src/Util.h
* src/download_helper.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/DefaultBtContextTest.cc
* test/MultiDiskAdaptorTest.cc
* test/MultiFileAllocationIteratorTest.cc
* test/UtilTest.cc
Applied basename function to remove directory element in
content-disposition value.
Return empty string if content-disposition value is ".." or ".".
* src/Util.cc
* test/UtilTest.cc
Added --max-overall-download-limit option. Now
--max-upload-limit option is not ignored when
--max-overall-upload-limit option has non-zero value. aria2
checks download(upload) speed in the order:
first checks overall speed limit and if it is not exceeded, then
checks speed limit per download. Thus you can specify both
value. For example, set --max-overall-download-limit=1M and
--max-download-limit=500K to prevent from one download from
eating all overall speed limit.
* src/DefaultBtInteractive.cc
* src/DefaultBtInteractive.h
* src/DefaultBtMessageDispatcher.cc
* src/DefaultBtMessageDispatcher.h
* src/DownloadCommand.cc
* src/DownloadCommand.h
* src/FtpNegotiationCommand.cc
* src/HttpResponseCommand.cc
* src/OptionHandlerFactory.cc
* src/PeerInteractionCommand.cc
* src/RequestGroup.cc
* src/RequestGroup.h
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/DefaultBtMessageDispatcherTest.cc
Fixed the bug that disk writer is not created even if it shares
same piece with the preceding file if the length of previous
file is 0.
* src/MultiDiskAdaptor.cc
* test/MultiDiskAdaptorTest.cc
Added --http-auth-challenge option. If it is set to true(by
default), aria2 sends HTTP authorization header only when it is
requested by the server. If false is set, then authorization
header is always sent to the server. This is useful for servers
that don't respond 401 code when authentication is required.
There is an exception: if username and password are embedded in
URI, authorization header is always sent to the server
regardless of this option.
* src/AuthConfigFactory.cc
* src/HttpSkipResponseCommand.cc
* src/OptionHandlerFactory.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/AuthConfigFactoryTest.cc
* test/HttpRequestTest.cc