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
Discard torrent file if path data in it contains directory
traversal directives. Discard metalink:file element in Metalink3
format if its name attribute contains directory traversal
directives. Ignore name attribute of metalink:signature element
in Metalink3 format if it contains directory traversal directives.
* src/MetalinkParserStateV3Impl.cc
* src/bittorrent_helper.cc
* src/message.h
* test/BittorrentHelperTest.cc
* test/Makefile.am
* test/MetalinkProcessorTest.cc
* test/metalink3-dirtraversal.xml
* test/test.xml
Store name attribute of metalink:metaurl element in MetalinkMetaurl.
* src/MetalinkMetaurl.h
* src/MetalinkParserController.cc
* src/MetalinkParserController.h
* src/MetalinkParserStateMachine.cc
* src/MetalinkParserStateMachine.h
* src/MetalinkParserStateV4Impl.cc
* test/MetalinkProcessorTest.cc
* test/metalink4-dirtraversal.xml
Return SharedHandle<LpdMessage>(new LpdMessage()) if received data
is bad in LpdMessageReceiver.
* src/LpdMessage.h
* src/LpdMessageReceiver.cc
* src/LpdMessageReceiver.h
* src/LpdReceiveMessageCommand.cc
* test/LpdMessageReceiverTest.cc
Added --bt-lpd-interface option to specify the interface to use
for Local Peer Discovery. LpdMessageDispatcher object now has its
own socket. LpdMessageReceiver's socket is binded to multicast
address to only receive multicast packets.
* src/BtSetup.cc
* src/LpdMessageDispatcher.cc
* src/LpdMessageDispatcher.h
* src/LpdMessageReceiver.cc
* src/LpdMessageReceiver.h
* src/LpdReceiveMessageCommand.cc
* src/LpdReceiveMessageCommand.h
* src/OptionHandlerFactory.cc
* src/SocketCore.cc
* src/SocketCore.h
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/LpdMessageDispatcherTest.cc
* test/LpdMessageReceiverTest.cc
User-defined custom request headers specified by --header option
now override builtin headers if they have same name.
* src/HttpRequest.cc
* src/HttpRequest.h
* test/HttpRequestTest.cc
Added unit tests for util::getContentDispositionFilename() from
http://greenbytes.de/tech/tc2231/ Fixed the function so that added
tests are passed.
* src/util.cc
* test/UtilTest.cc
Support RFC2231 "Parameter Value Character Set and Language
Information" in Content-Disposition header.
* src/HttpResponse.cc
* src/util.cc
* src/util.h
* test/UtilTest.cc
Moved getFirstNMissingIndex to bitfield.h and made it return the
number of appended indexes.
* src/BitfieldMan.cc
* src/BitfieldMan.h
* src/Piece.cc
* src/Piece.h
* src/bitfield.h
* test/BitfieldManTest.cc
Added BitfieldMan::getFirstNMissingUnusedIndex() to get multiple
unused block indexes at once instead of calling
getFirstMissingUnusedIndex() multiple times. Made use of it in
Piece class and DefaultBtRequestFactory class via Piece class.
* src/BitfieldMan.cc
* src/BitfieldMan.h
* src/DefaultBtRequestFactory.cc
* src/Piece.cc
* src/Piece.h
* test/BitfieldManTest.cc
Added bittorrent key to the response of tellStatus XML-RPC method.
The associated value of the key is a struct and contains data
retrieved from .torrent file, such as name, announce-list,
comment, etc.
* doc/aria2c.1.txt
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* test/XmlRpcMethodTest.cc
Fixed the bug that cookie for domain a.b.c is not sent to the host
a.b.c if no other cookies are stored. Fixed the bug that
Cookie::markOriginServerOnly() is not called when cookies are
loaded from file/sqlite3 database.
* src/Cookie.h
* src/CookieStorage.cc
* src/NsCookieParser.cc
* src/Sqlite3MozCookieParser.cc
* test/CookieStorageTest.cc
* test/NsCookieParserTest.cc
* test/Sqlite3MozCookieParserTest.cc
* test/cookies.sqlite
* test/nscookietest.txt
Removed RequestGroup::initSegmentMan(). Guaranteed that either
both _pieceStorage and _segmentMan are initialized or they are
not.
* src/RequestGroup.cc
* src/RequestGroup.h
* test/BtDependencyTest.cc
Added dir and files key to the response struct of aria2.tellStatus
XML-RPC method. The value associated with files key is the list
of files. Its element is the same struct used in aria2.getFiles
XML-RPC method. Added uris key to the response struct of
aria2.getFiles XML-RPC method. The value associated with uris key
is the list of URIs. Its element is the same struct used in
aria2.getUris XML-RPC method.
* doc/aria2c.1.txt
* src/XmlRpcMethodImpl.cc
* test/XmlRpcMethodTest.cc
Added aria2.getSessionInfo XML-RPC method. This method returns a
struct containing Session ID, which is generated each time when
aria2 is invoked.
* doc/aria2c.1.txt
* doc/xmlrpc/aria2rpc
* src/DownloadEngine.cc
* src/DownloadEngine.h
* src/XmlRpcMethodFactory.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* test/XmlRpcMethodTest.cc
Now offset argument in aria2.tellWaiting and aria2.tellStopped
accepts a negative integer. 'offset' == -1 points last download
in the waiting queue and 'offset' == -2 points the download before
the last download, and so on. The downloads in the response are in
reversed order.
* doc/aria2c.1.txt
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* test/XmlRpcMethodTest.cc
Now --all-proxy, --http-proxy, --https-proxy and --ftp-proxy
option accepts empty string "". When "" is given, it erases
previously defined proxy.
* doc/aria2c.1.txt
* src/OptionHandlerImpl.h
* src/usage_text.h
* test/OptionHandlerTest.cc
Fixed the bug that causes segmentation fault if unknown option is
put in aria2.conf file. BUG#2928303
* src/OptionParser.cc
* src/OptionParser.h
* src/option_processing.cc
* test/OptionParserTest.cc
Defined method name in XmlRpcMethod subclasses.
* src/XmlRpcMethodFactory.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* test/XmlRpcMethodTest.cc
Use AI_ADDRCONFIG flag if it is available. Refactored so that
getaddrinfo calls are not scattered around. Unset AI_ADDRCONFIG
when conducting unit tests because they fail if networking
interface is not configured with IPv4 address.
* src/NameResolver.cc
* src/SocketCore.cc
* src/SocketCore.h
* src/a2netcompat.h
* test/AllTest.cc
Added --bt-save-metadata option. When true is given, it saves
metadata as .torrent file. This option has effect only when
BitTorrent Magnet URI is used. The filename is name in metadata
with suffix .torrent. The directory to be saved is the same
directory where download file is saved. If the same file already
exists, metdata is not saved.
* src/OptionHandlerFactory.cc
* src/UTMetadataPostDownloadHandler.cc
* src/UTMetadataPostDownloadHandler.h
* src/message.h
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/UTMetadataDataExtensionMessageTest.cc
Added changePosition XML-RPC method. It takes 3 parameters: gid,
pos and how. This method changes the position of download denoted
by gid. If how is POS_SET, it moves the download to a position
relative to the beginning of the queue. If how is POS_CUR, it
moves the download to a position relative to the current
position. If how is POS_END, it moves the download to a position
relative to the end of the queue. If the destination position is
less than 0 or beyond the end of the queue, it moves the download
to the beginning or the end of the queue respectively. Returns
the destination position.
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/XmlRpcMethodFactory.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* test/RequestGroupManTest.cc
* test/XmlRpcMethodTest.cc