This change replaces the current 64 bit sequential GID with 64 bits
random bytes GID in an attempt to support persistent GID. Internally,
the GID is stored as uint64_t. For human representation and RPC
interface, GID is represented as 16 bytes hex string. For console
readout, 16 bytes are too long, so it is abbreviated to first 6 bytes.
When querying GID in RPC calls, user can speicfy the prefix of GID as
long as the prefix is shared by more than 1 GID entries.
DownloadHandlerConstants was simplified. MIME type handling in Accept
header was also reworked. DownloadContext's metalinkServerContacted_
is replaced with acceptMetalink_ and its boolean value is reverted.
RequestGroup and HttpRequest now do not hold vector of accepting
types. HttpRequest has the flag acceptMetalink_ which will be set by
the same value of DownloadContext::accpetMetalink_ and if it is true,
Metalink MIME types are added to Accept header field.
With BitTorrent or Metalink (metaurl), one RequestGroup can contain
multiple files. In this change, ensure that the sum of thoese files
must be equal or less than INT64_MAX.
This option sets a piece length for HTTP/FTP downloads. This is the
boundary when aria2 splits a file. All splits occur at multiple of
this length. This option will be ignored in BitTorrent downloads. It
will be also ignored if Metalink file contains piece hashes.
This option pauses download after added. This option is effective only
when --enable-rpc=true is given. When --save-session option is used
and there are paused downloads, they are saved with --pause=true so
that it will become paused state when the session is recovered.
If relative URI is found in Metalink file, aria2 resolves its full URI
contatenating the URI from which Metalink file is retrieved and
relative URI in Metalink file. This feature is not available if
Metalink file in local disk is specified in command line.
Removed SharedHandle::isNull(). Instead we added operator* and
operator unspecified_bool_type. Removed use of WeakHandle and
replaced with raw pointer.
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
Fixed the bug that feeding Metalink XML via pipe (-M- option) does
not work when aria2 is built with expat. Fixed the bug that when
Metalink XML is fed via pipe and --save-session is used, entry
"/dev/stdin" is saved in session file.
* src/ExpatMetalinkProcessor.cc
* src/ExpatMetalinkProcessor.h
* src/Metalink2RequestGroup.cc
Store both whole checksum and piece hash in metalink file.
Dispatch whole checksum verification only when piece hash is not
set.
* src/DownloadCommand.cc
* src/Metalink2RequestGroup.cc
* test/Metalink2RequestGroupTest.cc
Fixed the bug that name attribute of file element in Metalink file
is not properly sanitized.
* src/Metalink2RequestGroup.cc
* src/MetalinkParserController.cc
* test/Makefile.am
* test/Metalink2RequestGroupTest.cc
* test/metalink4-dosdirtraversal.xml
Made aria2 not send
"application/metalink4+xml,application/metalink+xml" in Accept
header for web-seeding URIs and tracker request.
* src/Metalink2RequestGroup.cc
* src/TrackerWatcherCommand.cc
* src/download_helper.cc
* src/util.cc
* src/util.h
Avoid to calculate end() iterator in each loop. std::deque is
particularly slow. Make sure that recalculate end iterator if
element is erased during loop.
Fixed the bug that grouped FileEntry objects are not used but
instead all FileEntry objects are used for each metaurl group.
* src/Metalink2RequestGroup.cc
* test/Metalink2RequestGroupTest.cc
* test/metalink4-groupbymetaurl.xml
Replaced null or control characters in file path with '_'. For
MinGW32 build, additional characters which is not allowed in
Windows kernel are also replaced. util::detectDirTraversal() now
returns true if given string contains null or control characters.
* src/DownloadContext.cc
* src/DownloadContext.h
* src/Metalink2RequestGroup.cc
* src/MetalinkParserController.cc
* src/bittorrent_helper.cc
* src/util.cc
* src/util.h
* test/UtilTest.cc
Added following 2 keys, followedBy and belongsTo, to the response
of tellStatus.
followedBy: List of GIDs which are generated by the consequence of
this download. For example, when aria2 downloaded Metalink file,
it generates downloads described in it(see *--follow-metalink*
option). This value is useful to track these auto generated
downloads. If there is no such downloads, this key will not be
included in the response.
belongsTo: GID of a parent download. Some downloads are a part of
another download. For example, if a file in Metalink has
BitTorrent resource, the download of .torrent is a part of that
file. If this download has no parent, this key will not be
included in the response.
* src/BtPostDownloadHandler.cc
* src/DownloadResult.h
* src/Metalink2RequestGroup.cc
* src/MetalinkPostDownloadHandler.cc
* src/RequestGroup.cc
* src/RequestGroup.h
* src/UTMetadataPostDownloadHandler.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h