Commit Graph

193 Commits (c1dbd9f6a53304c0d0c17fdc9e1ce0da9cb743cc)

Author SHA1 Message Date
Tatsuhiro Tsujikawa 2a4d39b7e8 Don't add C++11 switch flags to CXXFLAGS 2016-01-30 19:14:38 +09:00
Tatsuhiro Tsujikawa dda0b62fb9 Add --enable-werror option to configure to enable warning flags 2016-01-22 23:22:46 +09:00
Tatsuhiro Tsujikawa f6fc952486 Don't modify user variables (e.g., CFLAGS, LIBS, etc) 2016-01-22 22:27:39 +09:00
Tatsuhiro Tsujikawa 9cbbe9f1bb Split UtilTest.cc into UtilTest1.cc and UtilTest2.cc 2015-02-08 00:31:33 +09:00
Nils Maier f7cc24d6cf Internally use HMAC in http auth
To at least get constant time compare.
Also fix incorrect parsing of the creds (were incorrectly stripped).
Also add unit tests.
2014-05-22 15:24:20 +02:00
Nils Maier 98ba096951 Add util::security (compare, HMAC, PBKDF2)
See #220
2014-04-19 19:07:38 +02:00
Nils Maier 010131161e Remove ENABLE_MESSAGE_DIGEST, since we got the internal md, always 2014-04-17 18:02:42 +02:00
Tatsuhiro Tsujikawa 705dadb32b Fix crash when metaurl contains unsupported URI or text 2013-12-07 01:16:47 +09:00
Tatsuhiro Tsujikawa 9e52483c04 Refactor DownloadHandlerFactory 2013-11-10 18:19:02 +09:00
Tatsuhiro Tsujikawa 286bb2840e Remove Triplet, use std::tuple instead 2013-06-22 21:08:50 +09:00
Tatsuhiro Tsujikawa 07d270c87e Require -std=c++11 and use std::shared_ptr instead of SharedHandle 2013-06-22 01:10:38 +09:00
Tatsuhiro Tsujikawa 4e8742597a Add aria2api unit tests 2013-05-15 22:59:26 +09:00
Tatsuhiro Tsujikawa 6fcf274f27 Add initialization function and addUri API function for libaria2 2013-04-26 23:59:48 +09:00
Tatsuhiro Tsujikawa bbb978948d Add preliminary libtool files for libaria2 2013-04-25 11:38:26 +09:00
Tatsuhiro Tsujikawa 841fdbb965 Add GZipFileTest
For now, it is a copy of BufferedFileTest.cc
2013-03-03 14:16:32 +09:00
Nils Maier f2f8b14047 Support for gzipped -i and --save-session
Saved sessions may very large, as in hundreds and even thousands of
megabyte when dealing with large queues.
Add support to save and reload sessions to gzipped files, when libz is
available.

The session serializer will output gzipped contents when the file ends
with .gz, while the input file reader (UriListParser) will accept
whatever is thrown at it.
2013-03-02 15:48:26 +01:00
Tatsuhiro Tsujikawa d68741697a Support UDP tracker
It shares UDP listening port with IPv4 DHT. At the moment, in order to
enable UDP tracker support, enable IPv4 DHT.
2013-02-25 00:56:49 +09:00
Tatsuhiro Tsujikawa 13975f66a2 test: Add missing filelist2.txt to EXTRA_DIST 2013-02-02 21:22:18 +09:00
Tatsuhiro Tsujikawa 07bb779eb0 Faster deletion of RequestGroup and DownloadResult lists 2012-12-19 23:03:48 +09:00
Tatsuhiro Tsujikawa b9da9d4ed3 Use 64 bits random bytes as GID
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.
2012-12-16 17:29:01 +09:00
Tatsuhiro Tsujikawa f314719618 Added --disk-cache option
This option enables disk cache. If SIZE is 0, the disk cache is
disabled. This feature caches the downloaded data in memory, which
grows to at most SIZE bytes. The cache storage is created for aria2
instance and shared by all downloads. The one advantage of the disk
cache is reduce the disk seek time because the data is written in
larger unit and it is reordered by the offset of the file. If the
underlying file is heavily fragmented it is not the case.
2012-12-03 01:39:10 +09:00
Tatsuhiro Tsujikawa 692f978978 Rewritten URI parser 2012-10-14 00:14:50 +09:00
Tatsuhiro Tsujikawa c13dc166de Rewritten ExtensionMessageRegistry 2012-09-26 22:02:48 +09:00
Tatsuhiro Tsujikawa 4423ece43d Moved GZipDecoder to test 2012-09-24 22:38:59 +09:00
Tatsuhiro Tsujikawa 8311d6ef87 Added stream Bencode parser 2012-07-24 23:50:06 +09:00
Tatsuhiro Tsujikawa 57b46d5123 Added streaming parser for structured data format.
Added JSON streaming parser. Note that currently JSON parser ignores
frac and exp parts of number construct.
2012-07-10 01:42:42 +09:00
Tatsuhiro Tsujikawa f04090199f Rewritten timegm replacement function
The algorithm is based on Python 2.7 calendar.timegm.
2012-07-06 00:34:37 +09:00
Tatsuhiro Tsujikawa 92c518a2ba Moved parseAsyncDNSServers() to AsyncNameResolver.cc and refactored.
The parseAsyncDNSServers() now uses net::getBinAddr() internally,
which makes the function simpler. Also added unit test.
2012-05-16 23:05:09 +09:00
Tatsuhiro Tsujikawa 5bff877eae Fixed assertion failure if Chunked encoding along with Content-Length is used. 2012-03-05 12:45:05 +09:00
Tatsuhiro Tsujikawa 9b7e4219d9 Reserve PeerConnection's buffer capacity according to number of pieces.
If the number of pieces gets bigger, the length of Bitfield message
payload exceeds the initial buffer capacity of PeerConnection, which
is MAX_PAYLOAD_LEN.  We expand buffer as necessary so that
PeerConnection can receive the Bitfield message.
2012-02-09 01:51:42 +09:00
Tatsuhiro Tsujikawa 97a9242cbe Proxy URI is now constructed in getProxyUri().
The previous implementation constructs proxy URI in OptionHandler but
it cannot handle with the situation when user, password and proxy URI
is given various order.  Now we just set rules: username set in
--*-proxy-user overrides username in --*-proxy option, no matter in
any order username, password and proxy URI are parsed. Likewise,
password set in --*--proxy-passwd overrides password in --*-proxy
option.
2011-11-13 23:06:24 +09:00
Tatsuhiro Tsujikawa 787bfd75da Use XmlParser for XML-RPC. 2011-11-11 00:37:32 +09:00
Tatsuhiro Tsujikawa 30fdb08f40 Rewritten parametered URI handling routine. 2011-11-06 16:37:02 +09:00
Tatsuhiro Tsujikawa 4a455b5afe Removed IntSequence and Sequence<T> 2011-10-30 15:08:44 +09:00
Tatsuhiro Tsujikawa 78c3bcd199 Added SegList<T>, replacement of Sequence<T> 2011-10-29 21:51:58 +09:00
Tatsuhiro Tsujikawa c7ac147287 Added PieceStorage::onDownloadIncomplete() virtual function.
In DefaultPieceStorage::onDownloadIncomplete(), we call
StreamPieceSelector::onBitfieldInit().
Added GeomStreamPieceSelectorTest.
2011-08-24 23:16:06 +09:00
Tatsuhiro Tsujikawa 6cb91cae88 Added fopen/fread/fwrite/fgets wrapper class. 2011-08-06 21:17:36 +09:00
Tatsuhiro Tsujikawa 65ec9e98df Replaced InOrder with Inorder. 2011-06-11 21:49:09 +09:00
Tatsuhiro Tsujikawa 5cef1cb15c Added missing base_uri.xml to EXTRA_DIST 2011-05-16 23:28:33 +09:00
Tatsuhiro Tsujikawa f0cfbb21c1 Renamed classes in abstract layer of RPC service from XmlRpc* to Rpc*.
Now JSON-RPC is available by default regardless of XML library.
XML-RPC becomes available when XML library is available.
2011-03-14 16:38:54 +09:00
Tatsuhiro Tsujikawa 5a1fb3875f Added XmlRpcResponseTest. Set null as id if id is not sent.
Removed unused XmlRpcResponse::toJsonBatch(). Set default value false
to gzip argument of xmlrpc::toJsonBatch().
2011-03-14 15:31:26 +09:00
Tatsuhiro Tsujikawa 7338a25035 Added initial JSON-RPC support.
JSON-RPC is enabled using --enable-xml-rpc. We are implementing
JSON-RPC based on JSON-RPC 2.0 draft spec.
2011-03-09 23:07:27 +09:00
Tatsuhiro Tsujikawa 7230fbd2f7 Replaced HAVE_LIBZ with HAVE_ZLIB 2011-02-18 22:34:38 +09:00
Tatsuhiro Tsujikawa 3f125dce21 Use LIBS and CPPFLAGS instead of substituting them individually per
library.
2011-02-18 18:53:53 +09:00
Tatsuhiro Tsujikawa 3ee6784b76 Made `make distcheck' pass.
We added 2 macros A2_TEST_DIR and A2_TEST_OUT_DIR to pass tests in
`make distcheck`.  A2_TEST_DIR refers to test directory.  All output
files by unit tests are now created under A2_TEST_OUT_DIR directory.
2010-12-02 22:52:35 +09:00
Tatsuhiro Tsujikawa 694fb307aa 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced StringFormat with fmt
2010-11-20 09:36:14 +00:00
Tatsuhiro Tsujikawa 1eef862cc3 2010-11-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced BNode with DHTBucketTreeNode which is 2 times efficient.
	* src/BNode.cc: Removed
	* src/BNode.h: Removed
	* src/DHTBucketTree.cc
	* src/DHTBucketTree.h
	* src/DHTRoutingTable.cc
	* src/DHTRoutingTable.h
	* src/Makefile.am
	* test/BNodeTest.cc: Removed
	* test/DHTBucketTreeTest.cc
	* test/Makefile.am
2010-11-17 15:42:23 +00:00
Tatsuhiro Tsujikawa 89f997ec0d 2010-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced MessageDigestContext with MessageDigest.  Cleaned up
	unnecessary functions in MessageDigestHelper.
	* src/BtPieceMessage.cc
	* src/Checksum.h
	* src/DHTTokenTracker.cc
	* src/DownloadCommand.cc
	* src/DownloadCommand.h
	* src/HashFuncEntry.h
	* src/IteratableChecksumValidator.cc
	* src/IteratableChecksumValidator.h
	* src/IteratableChunkChecksumValidator.cc
	* src/IteratableChunkChecksumValidator.h
	* src/LibgcryptMessageDigestImpl.cc
	* src/LibgcryptMessageDigestImpl.h
	* src/LibsslMessageDigestImpl.cc
	* src/LibsslMessageDigestImpl.h
	* src/MSEHandshake.cc
	* src/MSEHandshake.h
	* src/Makefile.am
	* src/MessageDigest.cc
	* src/MessageDigest.h
	* src/MessageDigestHelper.cc
	* src/MessageDigestHelper.h
	* src/MessageDigestImpl.h
	* src/MetalinkParserController.cc
	* src/Piece.cc
	* src/Piece.h
	* src/UTMetadataDataExtensionMessage.cc
	* src/bittorrent_helper.cc
	* src/messageDigest.cc: Removed
	* src/messageDigest.h: Removed
	* src/util.cc
	* src/version_usage.cc
	* test/BittorrentHelperTest.cc
	* test/GZipDecoderTest.cc
	* test/GZipDecodingStreamFilterTest.cc
	* test/IteratableChecksumValidatorTest.cc
	* test/IteratableChunkChecksumValidatorTest.cc
	* test/Makefile.am
	* test/MessageDigestHelperTest.cc
	* test/MessageDigestTest.cc
	* test/Metalink2RequestGroupTest.cc
	* test/MetalinkProcessorTest.cc
	* test/PieceTest.cc
	* test/TestUtil.cc
	* test/TestUtil.h
	* test/UTMetadataDataExtensionMessageTest.cc
	* test/UTMetadataPostDownloadHandlerTest.cc
2010-11-11 02:56:24 +00:00
Tatsuhiro Tsujikawa 8b17d4b276 2010-10-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten Cookie class and Cookie parser based on
	http://tools.ietf.org/html/draft-ietf-httpstate-cookie-14 with
	some modifications. When parsing cookie date, match time first so
	that it parses asctime() format. The request-path must be ends
	with '/' so that request-path '/foo/' path-matches cookie-path
	'/foo' and '/foo/' in the proposed algorithm.
	* src/Cookie.cc
	* src/Cookie.h
	* src/CookieParser.cc: Removed
	* src/CookieParser.h: Removed
	* src/CookieStorage.cc
	* src/CookieStorage.h
	* src/HttpResponse.cc
	* src/Makefile.am
	* src/Makefile.in
	* src/MultiUrlRequestInfo.cc
	* src/NsCookieParser.cc
	* src/NsCookieParser.h
	* src/Sqlite3CookieParser.cc
	* src/Sqlite3CookieParser.h
	* src/a2functional.h
	* src/cookie_helper.cc
	* src/cookie_helper.h
	* src/util.cc
	* src/util.h
	* test/CookieBoxFactoryTest.cc: Removed
	* test/CookieHelperTest.cc
	* test/CookieParserTest.cc: Removed
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
	* test/HttpRequestTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/NsCookieParserTest.cc
	* test/Sqlite3CookieParserTest.cc
	* test/TestUtil.cc
	* test/TestUtil.h
	* test/a2functionalTest.cc
	* test/chromium_cookies.sqlite
	* test/cookies.sqlite
	* test/nscookietest.txt
2010-10-09 14:22:49 +00:00
Tatsuhiro Tsujikawa 584af68e19 2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Execute 5 DHT tasks concurrently in each task queue.
	* src/DHTTaskExecutor.cc
	* src/DHTTaskExecutor.h
	* src/DHTTaskQueueImpl.cc
	* src/DHTTaskQueueImpl.h
	* src/Makefile.am
	* test/DHTTaskExecutorTest.cc
	* test/Makefile.am
	* test/MockDHTTask.h
2010-10-02 14:38:37 +00:00