Added the ability to save signature when download is completed
if
signature is available. The filename of signature file is the
path to
download file followed by ".sig". If it already exists, then
signature
will not be saved.
* src/RequestGroupMan.cc
* src/Signature.cc
* test/SignatureTest.cc
Renamed --bt-seed option as --bt-seed-unverified so that it
makes clear
that this is not going to verify files using piece hashes.
* src/HelpItemFactory.cc
* src/OptionHandlerFactory.cc
* src/RequestGroup.cc
* src/option_processing.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
Moved the calls of std::ios::exceptions() inside of try-catch
block
because if an error occurred in constructor of std::fstream,
then
exception is thrown immediately when std::ios::exceptions() is
called
which results unhandled exception and aria2c aborts.
* src/DefaultBtProgressInfoFile.cc
Fixed the bug that causes infinite loop when the number of
pieces are
fewer than allowed fast set size which is 10 by default.
* src/DefaultBtContext.cc
Introduced a2_struct_stat. It is defined as `struct _stati64' if
__MINGW32__ is defined, because under MinGW32, _stati64 is used
and its
second argument is of type `struct _stati64'. Otherwise it is
defined as
`struct stat'.
* src/AbstractDiskWriter.cc
* src/File.cc
* src/File.h
* src/a2io.h
Added gzip, deflate decoding support in HTTP using libz. If
compiled
with this feature, aria2 sends "Accept-Encoding: deflate, gzip"
header
to a HTTP server. If a server returns "Content-Encoding: gzip"
or
"Content-Encoding: deflate" then, aria2 decodes the response
body on the
fly and writes decoded data to a local disk.
* README
* README.html
* configure.ac
* m4/aria2_arg.m4: Added ARIA2_ARG_WITH and ARIA2_ARG_ENABLE,
they are
wrapper function for AC_ARG_WITH and AC_ARG_ENABLE respectively.
* m4/libz.m4
* src/Decoder.h
* src/DownloadCommand.cc
* src/DownloadCommand.h
* src/Exception.h
* src/GZipDecoder.cc
* src/GZipDecoder.h
* src/HttpHeader.cc
* src/HttpHeader.h
* src/HttpRequest.cc
* src/HttpRequest.h
* src/HttpResponse.cc
* src/HttpResponse.h
* src/HttpResponseCommand.cc
* src/Makefile.am
* test/GZipDecoderTest.cc
* test/HttpRequestTest.cc
* test/HttpResponseTest.cc
* test/Makefile.am
* test/Makefile.in
* test/gzip_decode_test.gz
Disabled getting size from the response of RETR.
If SIZE command failed, then disable resuming and segmented
downloading.
* src/FtpConnection.cc
* src/FtpConnection.h
* src/FtpNegotiationCommand.cc
* src/FtpNegotiationCommand.h
Use digits to find first byte of file size, which makes the
intention
of the code clearer.
* src/FtpConnection.cc
Don't call validateTotalLength() when size is 0.
* src/FtpNegotiationCommand.cc
If FTP server returns negative response with REST raw command
and
requested range is not 0, throw exception. If requested range is
0,
continue download a file from 0 byte.
* src/FtpNegotiationCommand.cc
* src/FtpNegotiationCommand.h
Supported FTP server which don't recognize SIZE raw command.
If SIZE raw command is failed, aria2 will try to get file size
from the response of RETR raw command. If both attempts are
failed,
then resuming and segmented downloading are disabled.
* src/FtpConnection.cc
* src/FtpConnection.h
* src/FtpNegotiationCommand.cc
* src/FtpNegotiationCommand.h
Filled up pieces based on the number of missing blocks, rather
than
simplay the number of piece * block length.
* src/BtRequestFactory.h
* src/DefaultBtInteractive.cc
* src/DefaultBtInteractive.h
* src/DefaultBtRequestFactory.cc
* src/DefaultBtRequestFactory.h
* src/Piece.cc
* src/Piece.h
* test/BitfieldManTest.cc
* test/DefaultBtRequestFactoryTest.cc
* test/MockBtRequestFactory.h
When there is not enough space in disk when writing a chunk of
data,
aria2 now prints the message to the console to warn user and
aborts
its download. Not all downloads are canceled because some
downloads
may use another disk or partition. BUG#1640332
* src/AbstractDiskWriter.cc
* src/PeerAbstractCommand.cc
* src/PeerAbstractCommand.h: Added onFailure() function for
override.
* src/PeerInteractionCommand.cc: In onFailure(), call
RequestGroup::
setHaltRequested(true) to cancel download.
* src/PeerInteractionCommand.h
Applied Ross's aria2-0.13.2+1-mingw-5.patch, which changes the
type of
socket from int to sock_t as sockets are unsigned in Windows.
For AsyncNameResolver, DownloadEngine, I did additional
modification
for the portion of the code changed according to epoll support.
I defined sock_t in a2netcompat.h to use sock_t without
including
SocketCore.h.
* src/AsyncNameResolver.cc
* src/AsyncNameResolver.h
* src/DownloadEngine.cc
* src/DownloadEngine.h
* src/SocketCore.cc
* src/SocketCore.h
* src/a2netcompat.h
Applied Ross's aria2-0.13.2+1-mingw-4.patch. With this change,
all
changes in the patch were applied.
* test/DHTConnectionImplTest.cc: Fixed unit test error in MinGW.
* test/DefaultPieceStorageTest.cc: Fixed unit test error in
MinGW.
* test/PeerMessageUtilTest.cc: Fixed unit test error in MinGW.
Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this change,
a2io.h and common.h were modified.
* src/a2io.h: Changed seek/stat/tell calls to use 64 bit
versions in
MinGW.
* src/common.h: Changed off_t to 64 bit in MinGW.
Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
only a2netcompat.h is modified.
* src/a2netcompat.h: Removed unused getaddrinfo related #define
directives.
Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
only gai_strerror.h is modified.
* src/gai_strerror.h: Fixed gai_strerror() function to report
all
winsock errors in MinGW.
Applied Ross's aria2-0.13.2+1-mingw-4.patch. In this commit,
only the
follow sources are applied.
* src/Platform.h: I removed HAVE_WINSOCK2_H directive from
Platform.h.
* src/Platform.cc: Moved common setup/teardown code to Platform
class.
I moved #endif // HAVE_WINSOCK2_H to the front of #include
"DlAbortEx.h"
I included locale.h from Platform.cc.
* src/main.cc: Moved common setup/teardown code to Platform
class.
* test/AllTest.cc: Use Platform class.
Set locale to C in AllTest.cc to prevent the messages to be
localized.
Applied Ross's aria2-0.13.2+1-mingw-3.patch.
* test/HttpHeaderTest.cc: Casted to off_t where it should.
* test/HttpRequestTest.cc: Casted to off_t where it should.
Applied Ross's aria2-0.13.2+1-mingw.patch and
aria2-0.13.2+1-mingw-2.patch.
* src/ConsoleStatCalc.cc: Added HAVE_TERMIOUS_H directive for
the
systems which don't have termious.h. I moved the directive
inside of
if(isTTY) { ... clause so that line is wiped out without
termious.h.
I also removed HAVE_ASCTIME_R clause because asctime_r is
provided
anyway.
* src/asctime_r.h
* src/asctime_r.c: Added for the systems don't have asctime_r
function.
I added 2nd argument to the prototype declaration.
* src/StringFormat.cc: Get rid of vasprintf.
* src/getaddrinfo.h: Fixed constants.
* configure.ac: Added the check for asctime_r function.
* src/Makefile.am: Added conditional based on HAVE_ASCTIME_R
Added writable test for Socket when the sending message is in
progress.
Usually the sending message is piece message. Without wriable
check,
upload latency is dropped to more than 1sec.
* src/PeerInteractionCommand.cc
Create only requested files and files which shares a piece with
requested file in multi-torrent downloads. Directory structures
are
also created in the same rule.
MultiDiskAdaptor::fileExists() now uses FileEntry instead of
DiskWriterEntry as in the previous implementation.
* src/MultiDiskWriter.cc
* src/MultiFileAllocationIterator.cc
* src/MultiFileAllocationIterator.h
* test/MultiFileAllocationIteratorTest.cc
Actively establish connection to peers in seeding, when peer
cache
is not full and max upload speed limit is not reached.
* src/ActivePeerConnectionCommand.cc
* src/ActivePeerConnectionCommand.h
Always remove a peer from cache in
DefaultPeerStorage::returnPeer(),
to make room more fleshy, recently found peers.
Peer::_badConditionStartTime is not used anymore. Consider to
remove
it.
* src/DefaultPeerStorage.cc
* test/DefaultPeerStorageTest.cc
Returns cached data only when the previous receiveHandshake() is
called
with peek = true.
* src/PeerConnection.cc (receiveHandshake)
* src/PeerConnection.h (receiveHandshake)
Changed default value of -s option from 1 to 5.
Also max value of -s option is changed from 5 to 16.
* src/HelpItemFactory.cc
* src/OptionHandlerFactory.cc
* src/option_processing.cc
* src/usage_text.h
Changed -s options behavior. Now it means the number of
connections
made simultaneously in each http/ftp download.
If 1 URL is specified, the behavior is the same with old
implementation.
If -s N is given and more than N URLs are specified, first N
URLs are
used and remaining URLs are used for backup. If less than N URLs
are
specified, some of URLs are used more than once so that totally
N
connections are made simultaneously.
* src/main.cc
* src/HttpHeaderProcessor.cc: Rewritten using std::string as a
buffer.
* src/HttpHeaderProcessor.h: Rewritten using std::string as a
buffer.
* src/HttpConnection.cc: Included missing sstream.
Limited the number files opened in each BitTorrent download. The
default
value is 100. The option to change this value will be added.
* src/MultiDiskAdaptor.cc
* src/MultiDiskAdaptor.h
* src/MultiFileAllocationIterator.cc
Drop connection if the incoming peer ID is the same with
localhost's
one. The previous implementation drops connection when incoming
peer's
IP address is the same with localhost's one.
* src/PeerListenCommand.cc
* src/DefaultBtInteractive.cc
Made DEFAULT_ANNOUNCE_INTERVAL 120, so that if first tracker
request
attempt is failed, then 2nd attempt get kicked out more quickly.
And it is now static const member of DefaultBtAnnounce.
* src/DefaultBtAnnounce.h
Calculate piece hash when data is arrived if the data is arrived
in
order. This removes additional read operation for hash
calculation.
If the data is arrived in out of order, the hash is calucated
when the
piece is completed. This is the same behavior as the old
implementation.
* src/BtPieceMessage.cc
* src/DefaultBtProgressInfoFile.cc
* src/DefaultPieceStorage.cc
* src/DownloadCommand.cc
* src/DownloadCommand.h
* src/DownloadEngine.cc
* src/GrowSegment.cc
* src/GrowSegment.h
* src/Piece.cc
* src/Piece.h
* src/PiecedSegment.cc
* src/PiecedSegment.h
* src/Segment.h
* test/PieceTest.cc
Removed repeated call of getTopDirPath(). Instead, call it once
and
cache the result.
* src/MultiDiskAdaptor.cc
* src/MultiDiskAdaptor.h
(mkdir, openFile, initAndOpenFile, openExistingFile)
Fixed compile error on debian etch.
The libc6 shipped with debian etch doesn't define ULLONG_MAX
properly
even if _GNU_SOURCE is defined. So define ULLONG_MAX in case
when
it is undefined.
* src/Util.cc (ULLONG_MAX)
Added epoll support. Use epoll if it is available. If not, use
select.
When async dns is enabled in compile time, epoll support is
enabled
only when aria2 is built with c-ares. This condition statement
is
defined in a2io.h.
Currently aria2 supports both c-ares and ares, but ares is
maintained
for quite a while and debian already has c-ares package, ares
support
will be dropped in the future version.
* configure.ac
* src/AbstractCommand.cc
* src/AsyncNameResolver.cc
* src/AsyncNameResolver.h
* src/Command.cc
* src/Command.h
* src/DownloadEngine.cc
* src/DownloadEngine.h
* src/PeerAbstractCommand.cc
* src/SocketCore.cc
* src/SocketCore.h
* src/a2io.h
Do not do write operation to /dev/null file.
* src/LogFactory.cc
* src/SimpleLogger.cc
Replaced vasprintf with vsnprintf
* src/SimpleLogger.cc (SimpleLogger::writeLog)
Reduced the usage of gettimeofday().
* src/DefaultBtMessageDispatcher.cc
(DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing)
(class FindStaleRequestSlot, class ProcessStaleRequestSlot)
* src/RequestSlot.cc
* src/RequestSlot.h
(RequestSlot::isTimeout)
Made RequestSlot have a reference to Piece object to avoid find
Piece repeatedly.
* src/DefaultBtMessageDispatcher.cc
(class FindStaleRequestSlot, class ProcessStaleRequestSlot)
* src/RequestSlot.cc
* src/RequestSlot.h
(RequestSlot::getPiece)
* test/DefaultBtMessageDispatcherTest.cc
Fixed compile error on Mac OS X 10.3.9. This error was caused by
the
name collision of static variable and predefined macro.
* src/BtContext.cc
* src/BtContext.h
* src/CookieBoxFactory.cc
* src/CookieBoxFactory.h
* src/CookieParser.cc
* src/CookieParser.h
* src/DefaultBtContext.cc
Fixed compile error when configured with --disable-metalink.
Also moved test/DownloadHandlerFactoryTest.cc to SRC in
Makefile.am.
* test/FeatureConfigTest.cc
* test/DownloadHandlerFactoryTest.cc
Revert the default value of --max-concurrent-downloads to 5.
Revert the default value of --metalink-servers to 5.
Man pages was also updated.
* src/option_processing.cc
* doc/aria2c.1.txt
* doc/aria2c.1.html
* doc/aria2c.1
Returns const reference. The internal urlencode function was
optimized
a little bit.
* src/Request.cc
* src/Request.h
* src/HttpRequest.cc
* src/HttpRequest.h
Defined option name and possible values as std::string to reduce
temporary string object creation in runtime.
* src/HelpItemFactory.cc
* src/LogFactory.cc
* src/Option.cc
* src/OptionHandlerFactory.cc
* src/option_processing.cc
* src/prefs.cc
* src/prefs.h
Use Option::getAsBool(...) instead of Option::get(...) and
compare
it with V_TRUE.
* src/DefaultPieceStorage.cc
* src/DownloadCommand.cc
* src/FtpNegotiationCommand.cc
* src/HttpRequest.cc
* src/InitiateConnectionCommand.cc
* src/RequestGroup.cc
Put piece selection strategy algorithm to RarestPieceSelector
class,
Added a switch to choose whether randomized selection so that
unit
tests emit same results in, possibly, win32.
* src/DefaultPieceStorage.cc
* src/DefaultPieceStorage.h
* src/RarestPieceSelector.cc
* src/RarestPieceSelector.h
* test/DefaultPieceStorageTest.cc
* test/RarestPieceSelectorTest.cc
Sorted DHTPeerAnnounceEntry in a ascending order of info hash
and
used lower_bound to process them rather than linear search.
* src/DHTPeerAnnounceStorage.cc
Call subtractPieceStats from ~PeerInteractionCommand only when
the
peer has at least one completed piece.
* src/Peer.cc
* src/Peer.h
* src/PeerInteractionCommand.cc
* src/PeerSessionResource.cc
* src/PeerSessionResource.h
Print download progress summary of all parallel downloads in specified
interval, default 60 secs. While aria2 could download several files
in parallel (see -j option), it displayed just first download progress,
and the other downloads are hidden from the users. This new feature
prints all downloads currently in-progress to the console so that you
can check the status of all downloads. The interval can be adjusted
by --summary-interval option.
The progress readout is now cut so that all fits in the one line of
console.
* src/ConsoleStatCalc.cc
* src/ConsoleStatCalc.h
* src/HelpItemFactory.cc
* src/OptionHandlerFactory.cc
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/main.cc
* src/option_processing.cc
* src/prefs.h
* src/usage_text.h
Defined static const std::string IP("ip"), PORT("port") and use
them
instead of string literals.
* src/DefaultPeerListProcessor.cc
* src/DefaultPeerListProcessor.h
Replaced "" with static const variable A2STR::NIL.
Replaced string comparison against "" with std::string::empty().
Added PROTO_* to Request class and use them as a protocol string
constant.
Made "started", "stopped", "completed" static const variable in
AnnounceList class.