Commit Graph

982 Commits (1e4f301ec1d64ada5926facb0115d029c2995c38)

Author SHA1 Message Date
Tatsuhiro Tsujikawa 74e5aa0ace Rewritten util::inSameCidrBlock() to support IPv6 address.
We also introduced union sockaddr_union in a2netcompat.h.
2011-10-19 23:14:13 +09:00
Tatsuhiro Tsujikawa 4747d003f7 Added test for inetNtop() 2011-10-18 22:57:59 +09:00
Tatsuhiro Tsujikawa 4f0a45abe2 Made toXml and toJson non-member function. 2011-10-18 00:55:58 +09:00
Tatsuhiro Tsujikawa e700d2bb1f Made LpdMessage struct 2011-10-18 00:47:14 +09:00
Tatsuhiro Tsujikawa fc4d38d236 Rewritten HttpProxyOptionHandler using uri::parse().
Removed test case where username is empty and resulted URI has empty
username in URI.
2011-10-18 00:40:43 +09:00
Tatsuhiro Tsujikawa 310e58bc62 Stored hash value as raw byte string, instead of hex digest. 2011-10-13 21:40:07 +09:00
Tatsuhiro Tsujikawa 7e7aeac3ff Added --piece-length option.
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.
2011-09-27 21:48:41 +09:00
Tatsuhiro Tsujikawa 05104ba177 Removed asString, asList, ... and use downcast<T> instead. 2011-09-26 21:45:45 +09:00
Tatsuhiro Tsujikawa c408dbba72 Recognize tab as white space before option in -i list. 2011-08-28 00:40:23 +09:00
Tatsuhiro Tsujikawa a743bef220 Fixed output file path of tests. 2011-08-25 00:26:36 +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 a081f651a1 GeomStreamPieceSelector: Made base changeable and added offsetIndex
parameter.
2011-08-24 21:56:55 +09:00
Tatsuhiro Tsujikawa 201af99501 Added GeomStreamPieceSelector. 2011-08-24 21:56:54 +09:00
Tatsuhiro Tsujikawa 0f72cbab8a JsonTest: Added test case for decoding escaped chars 2011-08-24 21:55:54 +09:00
Tatsuhiro Tsujikawa f7aeb86ccc Added --download-result option.
Added --download-result=OPT option.  This option changes the way
"Download Results" is formatted. If OPT is 'default', print GID,
status, average download speed and path/URI. If multiple files are
involved, path/URI of first requested file is printed and remaining
ones are omitted.  If OPT is 'full', print GID, status, average
download speed, percentage of progress and path/URI. The percentage of
progress and path/URI are printed for each requested file in each row.
2011-08-22 23:05:06 +09:00
Tatsuhiro Tsujikawa 3c73b6e767 Eliminated inet_ntoa and inet_ntop. Use getnameinfo() instead. 2011-08-20 21:53:48 +09:00
Tatsuhiro Tsujikawa 4c1c38a33f Ignore --out option supplied in command-line if -i is used.
You can still use out option in the text file specified in -i.
2011-08-18 18:36:17 +09:00
Tatsuhiro Tsujikawa dce0667c0b MinGW32 build: Replace all '\' in path with '/' in util::applyDir()
In MinGW32 build, replace all '\' in path with '/' in
util::applyDir().  Take into account '\' in File::getBasename() and
File::getDirname().
2011-08-18 17:27:41 +09:00
Tatsuhiro Tsujikawa 6ee913b0bc Simplified PieceStatMan and RarestPieceSelector.
Simplified PieceStatMan and RarestPieceSelector, but computation order
 to select piece index is still O(N) and unchanged.  Updating piece
 stat is improved to O(N) for bitfield update and O(1) for single
 index update, while old implementation needs O(NlogN) and O(N)
 respectively.
2011-08-10 21:29:01 +09:00
Tatsuhiro Tsujikawa e8e3a6f259 wallclock is now retrieved using global::wallclock() call.
This is necessary to avoid global variable initialization order
problem.
2011-08-10 01:17:28 +09:00
Tatsuhiro Tsujikawa 97f34ab668 Added global::cerr. windows.h now included from common.h
We replaced most of std::cerr with global::cerr.  windows.h is now
included from common.h. Before including it, we define WINVER.  We
renamed some variable name because some macros in windows.h collide
with them.
2011-08-10 00:38:48 +09:00
Tatsuhiro Tsujikawa a10cda2f17 Use global::cout to output string to stdout.
In MinGW32 build, global::cout is WinConsoleFile. When outputing to
console, it uses WriteConsoleW, so Unicode characters are written.
Fixed memory leak in WChar<->MultiByte conversion functions.  The
portion of code which uses std::cout is rewritten to use global::cout.
2011-08-09 23:33:55 +09:00
Tatsuhiro Tsujikawa 7368c9c9d8 Percent-encode non-printable ASCII and non-ASCII chars in FileEntry.
Percent-encode non-printable ASCII and non-ASCII chars in URI using
util::percentEncodeMini() when URI is added to FileEntry.  Removed
percent-encode from Request. Also do percent-encoding when setting
referer and redirected URI.
2011-08-07 20:46:04 +09:00
Tatsuhiro Tsujikawa a6c2ad53bf Rewritten UriListParser using BufferedFile 2011-08-07 01:05:02 +09:00
Tatsuhiro Tsujikawa 1f710d29c1 Rewritten SessionSerializer using BufferedFile 2011-08-07 00:36:44 +09:00
Tatsuhiro Tsujikawa 190d170076 Rewritten ServerStatMan using BufferedFile. 2011-08-07 00:10:53 +09:00
Tatsuhiro Tsujikawa 7f3d027b83 Removed feof from operator unspecified_bool_type. Added eof().
In BufferedFile, removed feof from operator unspecified_bool_type. EOF
can be queried separately using newly added eof().
2011-08-07 00:06:32 +09:00
Tatsuhiro Tsujikawa 6cb91cae88 Added fopen/fread/fwrite/fgets wrapper class. 2011-08-06 21:17:36 +09:00
Tatsuhiro Tsujikawa 168094560d Rewritten CookieStorage using stdio instead of stream 2011-08-05 22:44:54 +09:00
Tatsuhiro Tsujikawa dea7a7969c Rewritten DHTRoutingTableSerializer using stdio instead of stream. 2011-08-05 22:15:55 +09:00
Tatsuhiro Tsujikawa f141cd4228 Rewritten DHTRoutingTableDeserializer using stdio instead of stream. 2011-08-05 21:50:11 +09:00
Tatsuhiro Tsujikawa 3879da592d In MinGW32, open file with UNICODE filename and print them in ANSI. 2011-08-04 21:43:02 +09:00
Tatsuhiro Tsujikawa 70eeebfae9 Retry DHT get_peers task if the number of peers in PeerStorage is less
than max peers.

Added virtual size_t countPeer() const to PeerStorage.
2011-07-29 23:49:25 +09:00
Tatsuhiro Tsujikawa 4ea28cb837 Don't send basic auth header to service operated on differenct port.
When --http-auth-challenge=true, aria2 only sends basic auth header
when requested. Old implementation sends basic auth header to service
operated in different port in successive request. This change avoid
this bug.
2011-07-27 23:28:31 +09:00
Tatsuhiro Tsujikawa 02292feaba Consistent naming scheme for hash type and digest for Piece. 2011-07-27 22:50:10 +09:00
Tatsuhiro Tsujikawa 03f0774482 Consistent naming scheme for hash type and digest for DownloadContext. 2011-07-27 22:44:30 +09:00
Tatsuhiro Tsujikawa 7b86b294c9 Consistent naming scheme for hash type and digest. 2011-07-27 21:44:54 +09:00
Tatsuhiro Tsujikawa 67e91c3431 HttpResponse::getDigest() now returns all Digest.
In addition, HttpResponse::getMetalinkHttpEntries() does not check
validity of URI. It is checked when we add it to FileEntry.
2011-07-27 19:32:35 +09:00
Tatsuhiro Tsujikawa 7c317de4e7 Added Metalink/HTTP Link and Digest header field parser. 2011-07-26 23:41:21 +09:00
Tatsuhiro Tsujikawa c58f736bb9 BtRegistry now holds BitTorrent TCP server port.
Because BitTorrent TCP server port is global configuration, it is not
preferable that per download resource BtRuntime holds it.  We also
refactored and eliminated ugly static variable in PeerListenCommand.
If TCP port is necessary, we inject it to them directly.
2011-07-21 23:42:41 +09:00
Tatsuhiro Tsujikawa dbf4f553ca Deprecated --enable-direct-io option.
Modified DeprecatedOptionHandler so that it can have replacing
OptionHandler.
2011-07-16 16:03:28 +09:00
Tatsuhiro Tsujikawa 5c4a52ad74 Managed user cuid in Piece.
Previous implementation does not store information which Command cuid
uses which Piece.  Mark Piece acquired by SegmentMan by setting
Piece::setUsedBySegment(true).
2011-07-16 00:58:41 +09:00
Tatsuhiro Tsujikawa d1885a5874 Allowed missing params in system.multicall RPC method. 2011-06-15 00:42:50 +09:00
Tatsuhiro Tsujikawa 65ec9e98df Replaced InOrder with Inorder. 2011-06-11 21:49:09 +09:00
Tatsuhiro Tsujikawa deaea9537b Added --stream-piece-selector option.
This option specifies piece selection algorithm used in HTTP/FTP
download. Piece means fixed length segment which is downloaded in
parallel in segmented download. If 'default' is given, aria2 selects
piece so that it reduces the number of establishing connection. This
is reasonable default behaviour because establishing connection is an
expensive operation.  If 'inorder' is given, aria2 selects piece which
has minimum index. Index=0 means first of the file. This will be
useful to view movie while downloading it. --enable-http-pipelining
option may be useful to reduce reconnection overhead.  Please note
that aria2 honors --min-split-size option, so it will be necessary to
specify a reasonable value to --min-split-size option.
2011-06-11 21:41:56 +09:00
Tatsuhiro Tsujikawa 595a514b17 Fixed typo 2011-06-11 18:03:33 +09:00
Tatsuhiro Tsujikawa cc82da3bab Added StreamPieceSelector class.
This class abstracts the piece selection algorithm for HTTP/FTP
download.
2011-06-11 17:34:17 +09:00
Tatsuhiro Tsujikawa 2799c9f0cc Only percent-encode non-printable ASCII chars(0x00-0x1f), non-ASCII
chars(>0x7f), ' ', '"', '<' and '>' for URIs supplied by user and
remote server(usually Location header field).
2011-06-01 01:34:30 +09:00
Tatsuhiro Tsujikawa 4784114281 Don't save removed download in --save-session text file.
Now stat column of removed downloads in Download Results is 'RM'
instead of INPR.
2011-05-29 20:59:45 +09:00
Tatsuhiro Tsujikawa 0f9b59cdce Fixed compile error with g++-4.6.1 2011-05-21 00:04:25 +09:00
Tatsuhiro Tsujikawa 5cef1cb15c Added missing base_uri.xml to EXTRA_DIST 2011-05-16 23:28:33 +09:00
Tatsuhiro Tsujikawa 286991e17d Strip DQUOTE from cookie-value and updated doc. 2011-05-14 21:24:10 +09:00
Tatsuhiro Tsujikawa ad5af56c17 Support relative URI in Metalink file.
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.
2011-05-07 18:41:18 +09:00
Tatsuhiro Tsujikawa e7d7233d54 Moved joinUri from util namespace to uri namespace. 2011-05-06 23:20:43 +09:00
Tatsuhiro Tsujikawa 1122e55a35 Handle "..", "." in util::joinUri() 2011-04-30 22:42:10 +09:00
Tatsuhiro Tsujikawa 55d00d047c Added swap for UriStruct 2011-04-30 00:29:14 +09:00
Tatsuhiro Tsujikawa 871819af59 Added util::joinUri() 2011-04-30 00:15:27 +09:00
Tatsuhiro Tsujikawa 33b9b3b27d Added uri::construct() 2011-04-30 00:14:49 +09:00
Tatsuhiro Tsujikawa 3941c72219 Added test for OptionParser::getEraseAfterParse() 2011-04-22 23:45:30 +09:00
Tatsuhiro Tsujikawa 211c4ea9f4 If no data type tag is used in XML-RPC, treat the data as string. 2011-04-22 23:02:28 +09:00
Tatsuhiro Tsujikawa 46eced8ada Fixed compile error and unit test error without SSL library. 2011-03-17 16:08:39 +09:00
Tatsuhiro Tsujikawa 6e818a06dc Replaced gid_t with a2_gid_t cause gid_t is commonly used as group ID. 2011-03-17 12:17:46 +09:00
Tatsuhiro Tsujikawa 73572712d8 Use .meta4 instead of .metalink as suffix when saving metalink XML
uploaded by RPC.
2011-03-16 16:55:38 +09:00
Tatsuhiro Tsujikawa 15730aa560 Fixed the bug that JSONP callback function name is not encoded
properly.
2011-03-16 12:55:12 +09:00
Tatsuhiro Tsujikawa f999c2bcae Added test for JSON-RPC GET request without params parameter. 2011-03-16 12:51:43 +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 bf01bb84b6 Added JSONP support. Callback query parameter is "jsoncallback". 2011-03-14 00:57:05 +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 1698b2c7b1 Save downloads added by aria2.addTorrent or aria2.addMetalink in
--save-session file.

Uploaded data are saved as file named hex string of sha1 hash of
uploaded data plus extension(".torrent" for torrent and ".metalink"
for metalink). For example,
0a3893293e27ac0490424c06de4d09242215f0a6.torrent. The directory where
these files are saved is specified by --dir option. These file paths
are written in --save-session file.
2011-02-16 00:44:23 +09:00
Tatsuhiro Tsujikawa a21fb350a0 Fixed the bug that causes segmentation fault when unpause RequestGroup
which has resolved BtDependency.
2011-02-14 00:36:52 +09:00
Tatsuhiro Tsujikawa 656f8cf901 Don't calculate maxPeerListSize based on --bt-max-peers.
Always use MAX_PEER_LIST_SIZE by default.
2011-02-07 00:22:06 +09:00
Tatsuhiro Tsujikawa 2666bc8170 Renamed MessageDigestHelper as message_digest_helper
Static member variables in MessageDigestHelper class are now functions
under message_digest namespace.
2011-02-05 23:38:51 +09:00
Tatsuhiro Tsujikawa 38202a5565 Renamed MetalinkHelper as metalink_helper.
Static member functions in MetalinkHelper class is now functions under
metalink namespace.
2011-02-05 23:21:06 +09:00
Tatsuhiro Tsujikawa 8902c2a839 Rewritten DefaultPeerStorage::addPeer(const std::vector<SharedHandle<Peer> >&) 2011-01-31 23:00:05 +09:00
Tatsuhiro Tsujikawa 1b9329c67c Accept HTTP 304 reply as success when If-None-Match request-header
field is specified using --header option.

When --conditional-get is used, --allow-overwrite is now required to
overwrite existing file.
2011-01-29 23:19:10 +09:00
Tatsuhiro Tsujikawa 7a6ec762ef Added cast to time_t. 2011-01-29 21:36:00 +09:00
Tatsuhiro Tsujikawa 1d71626bea Supported multi-line HTTP header field value.
See http://tools.ietf.org/html/rfc2616#section-4.2
2011-01-20 00:25:01 +09:00
Tatsuhiro Tsujikawa 97d0b71dd4 Don't use SocketCore::isReadable() repeatedly.
We can know whether data is available by inspecting 2nd argument of
SocketCore::readData() because we use non-blocking I/O.
2011-01-16 21:04:31 +09:00
Tatsuhiro Tsujikawa ce2d401dce Eliminated SocketCore::peekData from MSEHandshake. 2011-01-09 18:34:06 +09:00
Tatsuhiro Tsujikawa 920583502e Consider IP address and port when finding DHT node. 2011-01-07 00:14:42 +09:00
Tatsuhiro Tsujikawa d429943d05 Fixed the bug that peer is marked as seeder whenever it sends
extension handshake with metadata size.

Peer must be marked as seeder only when client has not got metadata
yet. This bug causes aria2 shutdowns connection early when it gets
have message from a peer because it wrongly recognizes the peer as
seeder.
2011-01-06 22:43:34 +09:00
Tatsuhiro Tsujikawa 0a2b1660fa Removed DownloadContext::dir_. Use PREF_DIR value instead. 2010-12-03 13:08:22 +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 476ba70a9f Moved errorCode_ from RecoverableException to Exception and added errorCode to
stackTrace.

Also changed errno to errNum in stackTrace.
2010-11-28 21:36:01 +09:00
Tatsuhiro Tsujikawa d316a00ade Replaced RequestGroup::lastUriResult_ with
RequestGroup::lastErrorCode_.
2010-11-28 17:00:30 +09:00
Tatsuhiro Tsujikawa 947967fc63 Renamed DownloadErrorCode.h as error_code.h. Renamed
downloaderrorcode::Value as error_code::Value.
2010-11-28 16:52:02 +09:00
Tatsuhiro Tsujikawa e39dd96171 Removed autogenerated files by automake/autoconf.
To generate these files, run 'autoreconf -i'.

Since libgnutls.m4 is no longer distributed, we removed
AM_PATH_LIBGNUTLS from configure.ac.
2010-11-27 23:31:17 +09:00
Tatsuhiro Tsujikawa 0455cde2a8 2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed unused FileEntry::setupDir()
	* src/FileEntry.cc
	* src/FileEntry.h
	* test/FileEntryTest.cc
2010-11-25 12:42:07 +00:00
Tatsuhiro Tsujikawa 63c84509b9 2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed unittest error
	* test/OptionHandlerTest.cc
2010-11-25 12:14:17 +00:00
Tatsuhiro Tsujikawa ea49e9c297 2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made strings which are only used in comparison plain C strings.
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/Netrc.cc
	* src/Netrc.h
	* test/HttpHeaderTest.cc
2010-11-25 12:13:33 +00:00
Tatsuhiro Tsujikawa 06cd151c4b 2010-11-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Cleaned up Possible Values in usage help.  More than 2 values are
	delimited by ", ".
	* src/NameMatchOptionHandler.h
	* src/OptionHandler.cc
	* src/OptionHandler.h
	* src/OptionHandlerFactory.cc
	* src/OptionHandlerImpl.cc
	* test/OptionHandlerTest.cc
2010-11-23 14:47:58 +00: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 d8d159ccd8 2010-11-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced HttpHeader::responseStatus_ with HttpHeader::statusCode_.
	statusCode_ is of type int.
	* src/AbstractProxyResponseCommand.cc
	* src/FtpNegotiationCommand.cc
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/HttpHeaderProcessor.cc
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/util.cc
	* src/util.h
	* test/HttpHeaderProcessorTest.cc
	* test/HttpHeaderTest.cc
	* test/HttpResponseTest.cc
	* test/UtilTest.cc
2010-11-15 12:52:03 +00:00
Tatsuhiro Tsujikawa 1372ac51ad 2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added .cc file for classes/structs that only provided by header
	file. Defined non-POD classes' ctor, dtor in .cc file.  Moved
	implementation code in header file to .cc file for major
	classes/strucsts.
2010-11-14 07:17:55 +00:00
Tatsuhiro Tsujikawa 93e5dbed32 2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed SharedHandle::isNull(). Instead we added operator* and
	operator unspecified_bool_type. Removed use of WeakHandle and
	replaced with raw pointer.
2010-11-12 12:48:48 +00:00
Tatsuhiro Tsujikawa bc98e39fe5 2010-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
To match the behavior of friend operator functions in
	SharedHandle.h to std::tr1::shared_ptr, we intentionally broke
	these functions and modified code so that our code does not depend
	on old behavior.
	* src/AbstractCommand.cc
	* src/DHTAbstractNodeLookupTask.h
	* src/DHTBucket.cc
	* src/DHTMessageReceiver.cc
	* src/DHTNodeLookupEntry.cc
	* src/DHTRoutingTable.cc
	* src/DefaultBtRequestFactory.cc
	* src/DefaultPeerStorage.cc
	* src/DefaultPieceStorage.cc
	* src/DownloadContext.cc
	* src/EpollEventPoll.cc
	* src/Event.h
	* src/HttpConnection.cc
	* src/KqueueEventPoll.cc
	* src/MultiDiskAdaptor.cc
	* src/PeerAbstractCommand.cc
	* src/PieceStatMan.cc
	* src/PollEventPoll.cc
	* src/PortEventPoll.cc
	* src/SegmentMan.cc
	* src/SelectEventPoll.cc
	* src/SelectEventPoll.h
	* src/ServerStatMan.cc
	* src/SharedHandle.h
	* src/UnknownLengthPieceStorage.cc
	* src/a2functional.h
	* src/option_processing.cc
	* src/version_usage.cc
	* test/BNodeTest.cc
	* test/DHTAnnouncePeerMessageTest.cc
	* test/DHTBucketTest.cc
	* test/DHTFindNodeMessageTest.cc
	* test/DHTGetPeersMessageTest.cc
	* test/DHTIDCloserTest.cc
	* test/DHTMessageFactoryImplTest.cc
	* test/DHTPingMessageTest.cc
	* test/DefaultBtRequestFactoryTest.cc
	* test/DefaultPeerStorageTest.cc
	* test/SequentialPickerTest.cc
	* test/SingletonHolderTest.cc
2010-11-11 07:33:43 +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 35cc4ed1e7 2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Return empty range if byte-range-resp-spec or instance-length is
	"*" in Content-Range header to prevent aria2 from emitting error
	failing to convert "*" to a integer.
	* src/HttpHeader.cc
	* test/HttpHeaderTest.cc
2010-10-31 07:56:01 +00:00
Tatsuhiro Tsujikawa 2b458da480 2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made #include guard consistent for c++ header files.
2010-10-31 07:23:53 +00:00
Tatsuhiro Tsujikawa 236e64cb25 2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use unnamed namespace instead of static keyword.
	* src/AbstractCommand.cc
	* src/AdaptiveURISelector.cc
	* src/Base64.cc
	* src/BitfieldMan.cc
	* src/BtDependency.cc
	* src/ConsoleStatCalc.cc
	* src/ContentTypeRequestGroupCriteria.cc
	* src/CookieStorage.cc
	* src/DHTMessageFactoryImpl.cc
	* src/DHTRoutingTableDeserializer.cc
	* src/DefaultBtAnnounce.cc
	* src/DefaultBtProgressInfoFile.cc
	* src/DefaultPeerStorage.cc
	* src/DefaultPieceStorage.cc
	* src/DownloadCommand.cc
	* src/DownloadEngine.cc
	* src/EpollEventPoll.cc
	* src/ExpatMetalinkProcessor.cc
	* src/ExpatXmlRpcRequestProcessor.cc
	* src/FileEntry.cc
	* src/HttpRequest.cc
	* src/HttpRequestCommand.cc
	* src/HttpResponseCommand.cc
	* src/KqueueEventPoll.cc
	* src/LongestSequencePieceSelector.cc
	* src/MetalinkParserStateV3Impl.cc
	* src/MetalinkParserStateV4Impl.cc
	* src/MultiDiskAdaptor.cc
	* src/MultiUrlRequestInfo.cc
	* src/OptionParser.cc
	* src/PeerSessionResource.cc
	* src/PortEventPoll.cc
	* src/Request.cc
	* src/RequestGroupMan.cc
	* src/SelectEventPoll.cc
	* src/SessionSerializer.cc
	* src/SimpleLogFormatter.cc
	* src/Sqlite3CookieParser.cc
	* src/TrackerWatcherCommand.cc
	* src/XML2SAXMetalinkProcessor.cc
	* src/Xml2XmlRpcRequestProcessor.cc
	* src/XmlRpcMethod.cc
	* src/XmlRpcMethodImpl.cc
	* src/XmlRpcResponse.cc
	* src/base32.cc
	* src/bencode2.cc
	* src/bittorrent_helper.cc
	* src/download_helper.cc
	* src/main.cc
	* src/messageDigest.cc
	* src/option_processing.cc
	* src/util.cc
	* test/AnnounceListTest.cc
	* test/BtRegistryTest.cc
	* test/DHTBucketTest.cc
	* test/DHTRoutingTableTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/FileEntryTest.cc
	* test/FtpConnectionTest.cc
	* test/MSEHandshakeTest.cc
	* test/MagnetTest.cc
	* test/XmlRpcMethodTest.cc
	* test/array_funTest.cc
2010-10-30 16:02:15 +00:00
Tatsuhiro Tsujikawa 423ec26fe4 2010-10-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use std::numeric_limits<time_t> instead of checking of
	sizeof(time_t).
	* src/NsCookieParser.cc
	* src/Sqlite3CookieParser.cc
	* src/cookie_helper.cc
	* test/CookieHelperTest.cc
	* test/CookieStorageTest.cc
	* test/NsCookieParserTest.cc
2010-10-27 14:54:25 +00:00
Tatsuhiro Tsujikawa 4516736a22 2010-10-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added testcase for File::mkdirs().
	* test/FileTest.cc
2010-10-11 15:15:51 +00:00
Tatsuhiro Tsujikawa 96ee327bf3 2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error without sqlite3
	* test/CookieStorageTest.cc
2010-10-10 14:05:08 +00:00
Tatsuhiro Tsujikawa f6dbba5427 2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Retrieve last access time from sqlite3 cookie database.
	* src/CookieStorage.cc
	* src/Sqlite3CookieParser.cc
	* src/Sqlite3CookieParser.h
	* src/Sqlite3CookieParserImpl.cc
	* test/Sqlite3CookieParserTest.cc
	* test/chromium_cookies.sqlite
	* test/cookies.sqlite
2010-10-10 09:53:30 +00:00
Tatsuhiro Tsujikawa 0abd4a2f7b 2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten util::split()
	* src/util.h
	* test/UtilTest.cc
2010-10-10 06:58:31 +00:00
Tatsuhiro Tsujikawa 1875d7382f 2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced util::split(a,b,c) and util::split(a,b) with
	util::divide()
	* src/ExpatMetalinkProcessor.cc
	* src/FtpConnection.cc
	* src/HttpHeader.cc
	* src/HttpResponse.cc
	* src/HttpServer.cc
	* src/OptionParser.cc
	* src/ParameterizedStringParser.cc
	* src/ServerStatMan.cc
	* src/magnet.cc
	* src/util.cc
	* src/util.h
	* test/UtilTest.cc
2010-10-10 03:39:00 +00:00
Tatsuhiro Tsujikawa 8e059b66fa 2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added util::lowercase() and util::uppercase().
	* src/cookie_helper.cc
	* src/util.cc
	* src/util.h
	* test/UtilTest.cc
2010-10-10 02:51:38 +00:00
Tatsuhiro Tsujikawa 788679f0df 2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added test cases for util::parseUIntNoThrow() and
	util::parseLLIntNoThrow().
	* test/UtilTest.cc
2010-10-09 16:58:58 +00:00
Tatsuhiro Tsujikawa 1505671e7b 2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use util::strip() instead of util::trim()
	* src/ExpatXmlRpcRequestProcessor.cc
	* src/FeatureConfig.cc
	* src/HttpHeader.cc
	* src/MetalinkParserStateV3Impl.cc
	* src/OptionHandlerImpl.h
	* src/ServerStatMan.cc
	* src/UriListParser.cc
	* src/Xml2XmlRpcRequestProcessor.cc
	* src/bittorrent_helper.cc
	* src/cookie_helper.cc
	* src/messageDigest.cc
	* src/util.cc
	* src/util.h
	* test/FeatureConfigTest.cc
	* test/HttpRequestTest.cc
	* test/UriListParserTest.cc
	* test/UtilTest.cc
2010-10-09 16:49:02 +00:00
Tatsuhiro Tsujikawa dbea00fa9d 2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added util::strip()
	* src/util.cc
	* src/util.h
	* test/UtilTest.cc
2010-10-09 16:22:56 +00:00
Tatsuhiro Tsujikawa f816434d06 2010-10-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added tests to HttpRequestTest about trailing slash of cookie
	path.
	* test/HttpRequestTest.cc
2010-10-09 14:52:41 +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 9b1280f7a3 2010-10-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Supported ANSI C's asctime() format in Time::parseHTTPDate().
	Added Time::parseAsctime(). Changed order of application of parse
	functions. I could not remember why parseRFC850() was tried first.
	* src/TimeA2.cc
	* src/TimeA2.h
	* test/TimeTest.cc
2010-10-04 15:12:27 +00:00
Tatsuhiro Tsujikawa 5db7b123b5 2010-10-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use inet_ntoa if inet_ntop is not available. Since inet_ntoa does
	not handle IPv6 address, IPv6 support is limited in this
	case. Fixed unit test error under mingw32.
	* configure.ac
	* src/AsyncNameResolver.cc
	* src/SocketCore.cc
	* src/bittorrent_helper.cc
	* test/BittorrentHelperTest.cc
	* test/DHTMessageFactoryImplTest.cc
	* test/DHTRoutingTableDeserializerTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/Metalink2RequestGroupTest.cc
	* test/UTPexExtensionMessageTest.cc
2010-10-04 14:33: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
Tatsuhiro Tsujikawa d5e0046f29 2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten util::escapePath(). Now it does not replace bad chars:it
	performs percent-encode against them.  util::fixTaintedBasename()
	now replaces "/" with "%2F".  Added 0x7f as bad chars in
	util::detectDirTraversal().
	* src/util.cc
	* test/UtilTest.cc
2010-10-02 08:20:10 +00:00
Tatsuhiro Tsujikawa d956ea0b70 2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Non-UTF8 filenames are now percent-encoded.  For example, filename
	for http://example.org/%90%A2%8AE will be %90%A2%8AE because it is
	Shift_JIS. The comments and name in .torrent file in XML-RPC
	response are percent-encoded if they are not UTF-8.
	* src/FtpNegotiationCommand.cc
	* src/HttpRequestCommand.cc
	* src/HttpResponseCommand.cc
	* src/XmlRpcMethodImpl.cc
	* src/bittorrent_helper.cc
	* src/util.cc
	* src/util.h
	* test/BittorrentHelperTest.cc
	* test/UtilTest.cc
2010-10-02 07:54:43 +00:00
Tatsuhiro Tsujikawa 6c348f0493 2010-09-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed TripletGet as TupleGet. Renamed TripletNthType as
	TupleNthType. Renamed Triplet2Pair as Tuple2Pair.
	* src/RequestGroupMan.cc
	* src/Triplet.h
	* test/TripletTest.cc
2010-09-26 07:23:00 +00:00
Tatsuhiro Tsujikawa e07f7207fa 2010-09-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten TripletNthType.
	* src/Triplet.h
	* test/TripletTest.cc
2010-09-26 06:46:12 +00:00
Tatsuhiro Tsujikawa aabd7b75f9 2010-09-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Sort usedHosts by least used and faster download speed.
	* src/Makefile.am
	* src/RequestGroupMan.cc
	* src/Triplet.h
	* test/Makefile.am
	* test/TripletTest.cc
2010-09-26 05:47:12 +00:00
Tatsuhiro Tsujikawa c56a9bc669 2010-09-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added keys parameter to aria2.tellStatus, aria2.tellActive,
	aria2.tellWaiting and aria2.tellStopped XML-RPC method.  'keys' is
	array of string. If it is specified, the response contains only
	keys in 'keys' array. If 'keys' is empty or not specified, the
	response contains all keys.  This is useful when you just want
	specific keys and avoid unnecessary transfers. For example,
	*aria2.tellStatus*("1", ["gid", "status"]) returns 'gid' and
	'status' key. Made get*Param() functions XmlRpcRequest's
	methods and changed portions of the code that were affected by
	this change.
	* doc/aria2c.1.txt
	* src/Makefile.am
	* src/XmlRpcMethodImpl.cc
	* src/XmlRpcMethodImpl.h
	* src/XmlRpcRequest.cc
	* src/XmlRpcRequest.h
	* test/XmlRpcMethodTest.cc
2010-09-19 09:49:11 +00:00
Tatsuhiro Tsujikawa 7f92e32e48 2010-09-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error without zlib
	* test/Makefile.am
2010-09-13 13:43:06 +00:00
Tatsuhiro Tsujikawa 6b6e6bc495 2010-09-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed ChunkedDecoder. Moved GZipDecodingStreamFilter to under
	'if HAVE_LIBZ'.
	* src/ChunkedDecoder.cc
	* src/ChunkedDecoder.h
	* src/Makefile.am
	* test/ChunkedDecoderTest.cc
	* test/Makefile.am
2010-09-13 12:14:07 +00:00
Tatsuhiro Tsujikawa 58ec84b1e7 2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added missing MockSegment.h to test/Makefile.am
	* test/Makefile.am
2010-09-11 14:41:52 +00:00
Tatsuhiro Tsujikawa 9eaf3ccb0f 2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced V_TRUE with A2_V_TRUE. Replaced V_FALSE with A2_V_FALSE.
	* src/AbstractCommand.cc
	* src/HttpResponseCommand.cc
	* src/Option.cc
	* src/OptionHandlerFactory.cc
	* src/OptionHandlerImpl.h
	* src/TrackerWatcherCommand.cc
	* src/download_helper.cc
	* src/main.cc
	* src/prefs.cc
	* src/prefs.h
	* test/AuthConfigFactoryTest.cc
	* test/DefaultBtProgressInfoFileTest.cc
	* test/DownloadHelperTest.cc
	* test/HttpRequestTest.cc
	* test/OptionHandlerTest.cc
	* test/UTMetadataPostDownloadHandlerTest.cc
	* test/XmlRpcMethodTest.cc
2010-09-11 12:48:03 +00:00
Tatsuhiro Tsujikawa ec3bd81486 2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Moved URI parser code to uri.h, uri.cc to provide fast URI parser
	without Request object initialization.
	* src/Makefile.am
	* src/Request.cc
	* src/uri.cc
	* src/uri.h
	* test/Makefile.am
	* test/RequestTest.cc
	* test/UriTest.cc
2010-09-11 09:11:57 +00:00
Tatsuhiro Tsujikawa bf9fd473bb 2010-09-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Allow '@' in username and password embedded in URI. It should be
	percent-encoded but many people use their mail address as an
	username and forget about PE.
	* src/Request.cc
	* test/RequestTest.cc
2010-09-08 14:35:30 +00:00
Tatsuhiro Tsujikawa efbfe4c006 2010-09-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Data from remote server in HTTP/FTP download are now written to
	the disk(or memory) through StreamFilter. Decoding chunked and
	gziped streams are done cascading StreamFilter.
	Removed inefficient 1byte read code.
	* src/ChunkedDecodingStreamFilter.cc
	* src/ChunkedDecodingStreamFilter.h
	* src/DownloadCommand.cc
	* src/DownloadCommand.h
	* src/GZipDecodingStreamFilter.cc
	* src/GZipDecodingStreamFilter.h
	* src/HttpConnection.cc
	* src/HttpDownloadCommand.cc
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* src/HttpResponseCommand.cc
	* src/HttpResponseCommand.h
	* src/HttpSkipResponseCommand.cc
	* src/HttpSkipResponseCommand.h
	* src/Makefile.am
	* src/NullSinkStreamFilter.cc
	* src/NullSinkStreamFilter.h
	* src/RequestGroup.cc
	* src/SinkStreamFilter.cc
	* src/SinkStreamFilter.h
	* src/StreamFilter.cc
	* src/StreamFilter.h
	* test/ChunkedDecodingStreamFilterTest.cc
	* test/GZipDecodingStreamFilterTest.cc
	* test/HttpResponseTest.cc
	* test/Makefile.am
	* test/MockSegment.h
2010-09-06 14:29:36 +00:00
Tatsuhiro Tsujikawa 939e4b2038 2010-08-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added test for previous change
	* test/NetrcTest.cc
2010-08-31 11:54:44 +00:00
Tatsuhiro Tsujikawa 0968d4fedd 2010-08-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed getMissingFastPiece(piece) and getMissingFastPiece(piece,
	excludedIndexes) from PieceStorage. Done some code cleanup.
	* src/DefaultPieceStorage.h
	* src/PieceStorage.h
	* src/UnknownLengthPieceStorage.cc
	* src/UnknownLengthPieceStorage.h
	* test/MockPieceStorage.h
2010-08-29 09:24:17 +00:00
Tatsuhiro Tsujikawa 4b2d1deff6 2010-08-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Pass excludedIndexes when getting metadata piece.
	* src/UTMetadataRequestFactory.cc
	* test/UTMetadataRequestFactoryTest.cc
2010-08-29 09:22:06 +00:00
Tatsuhiro Tsujikawa e997903e5d 2010-08-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added a sets of overloaded functions for
	PieceStorage::getMissingPiece() and getMissingFastPiece() to get
	multiple pieces more efficiently.
	* src/DefaultBtInteractive.cc
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/PieceStorage.h
	* src/UnknownLengthPieceStorage.cc
	* src/UnknownLengthPieceStorage.h
	* test/DefaultPieceStorageTest.cc
	* test/MockPieceStorage.h
2010-08-29 08:53:19 +00:00
Tatsuhiro Tsujikawa d5bb40ce9e 2010-08-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Wait data arrives at clientSocket_ in
	FtpConnectionTest::testReceiveEpsvResponse().
	* test/FtpConnectionTest.cc
2010-08-28 04:40:51 +00:00
Tatsuhiro Tsujikawa 835de071f2 2010-08-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Enter end game mode as soon as all pieces are assigned to peer to
	avoid substantial slow down at the very last stage of download.
	* src/DefaultBtInteractive.cc
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/PieceStorage.h
	* src/UnknownLengthPieceStorage.h
	* test/MockPieceStorage.h
2010-08-26 14:49:40 +00:00
Tatsuhiro Tsujikawa 26bf5ab5e2 2010-08-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --bt-tracker and --bt-exclude-tracker option.  In
	--bt-tracker option, you can specify comma separated list of
	additional BitTorrent tracker's announce URI. These URIs are not
	affected by --bt-exclude-tracker option because they are added
	after URIs in --bt-exclude-tracker option are removed.  In
	--bt-exclude-tracker option, you can specify comma separated list
	of BitTorrent tracker's announce URI to remove. You can use
	special value '*' which matches all URIs, thus removes all
	announce URIs. When specifying '*' in shell command-line, don't
	forget to escape or quote it.
	* src/BtDependency.cc
	* src/OptionHandlerFactory.cc
	* src/UTMetadataPostDownloadHandler.cc
	* src/bittorrent_helper.cc
	* src/bittorrent_helper.h
	* src/download_helper.cc
	* src/download_helper.h
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/BittorrentHelperTest.cc
	* test/DownloadHelperTest.cc
2010-08-24 14:21:12 +00:00
Tatsuhiro Tsujikawa 26d6692376 2010-08-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added IPv6 DHT. Added --dht-entry-porint6, --dht-file-path6,
	--dht-listen-addr6 and --enable-dht6 option.  IPv6 DHT is disabled
	by default. To use IPv6 DHT, you need to use --enable-dht6 and
	specify a global unicast address to --dht-listen-addr6.  IPv6 DHT
	is highly experimental.
	* src/BtSetup.cc
	* src/DHTAutoSaveCommand.cc
	* src/DHTAutoSaveCommand.h
	* src/DHTConnectionImpl.cc
	* src/DHTConnectionImpl.h
	* src/DHTEntryPointNameResolveCommand.cc
	* src/DHTFindNodeReplyMessage.cc
	* src/DHTFindNodeReplyMessage.h
	* src/DHTGetPeersMessage.cc
	* src/DHTGetPeersReplyMessage.cc
	* src/DHTGetPeersReplyMessage.h
	* src/DHTMessageFactory.h
	* src/DHTMessageFactoryImpl.cc
	* src/DHTMessageFactoryImpl.h
	* src/DHTMessageTracker.cc
	* src/DHTRegistry.cc
	* src/DHTRegistry.h
	* src/DHTRoutingTableDeserializer.cc
	* src/DHTRoutingTableDeserializer.h
	* src/DHTRoutingTableSerializer.cc
	* src/DHTRoutingTableSerializer.h
	* src/DHTSetup.cc
	* src/DHTSetup.h
	* src/FtpConnection.cc
	* src/LpdMessageReceiver.cc
	* src/OptionHandlerFactory.cc
	* src/OptionHandlerImpl.h
	* src/PeerInteractionCommand.cc
	* src/RequestGroup.cc
	* src/SocketCore.cc
	* src/SocketCore.h
	* src/bittorrent_helper.cc
	* src/bittorrent_helper.h
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/DHTConnectionImplTest.cc
	* test/DHTFindNodeReplyMessageTest.cc
	* test/DHTGetPeersMessageTest.cc
	* test/DHTGetPeersReplyMessageTest.cc
	* test/DHTMessageFactoryImplTest.cc
	* test/DHTRoutingTableDeserializerTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/LpdMessageDispatcherTest.cc
	* test/MockDHTMessageFactory.h
2010-08-07 14:15:21 +00:00
Tatsuhiro Tsujikawa c685ea9de9 2010-08-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added support for peers6 key in tracker response.  Added added6,
	added6.f and dropped6 in ut_pex.
	* src/BtAnnounce.cc
	* src/BtAnnounce.h
	* src/DefaultBtAnnounce.cc
	* src/UTPexExtensionMessage.cc
	* src/UTPexExtensionMessage.h
	* test/DefaultBtAnnounceTest.cc
	* test/UTPexExtensionMessageTest.cc
2010-08-05 11:54:44 +00:00
Tatsuhiro Tsujikawa 785a27f6e8 2010-08-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Add only gracefully disconnected peer to ut_pex dropped list.  Add
	incoming dropped list to PeerStorage.
	* src/DefaultBtInteractive.cc
	* src/DefaultPeerStorage.cc
	* src/InitiatorMSEHandshakeCommand.cc
	* src/Peer.cc
	* src/Peer.h
	* src/PeerConnection.cc
	* src/PeerConnection.h
	* src/PeerInteractionCommand.cc
	* src/PeerReceiveHandshakeCommand.cc
	* src/ReceiverMSEHandshakeCommand.cc
	* src/UTPexExtensionMessage.cc
	* test/DefaultPeerStorageTest.cc
	* test/UTPexExtensionMessageTest.cc
2010-08-04 15:00:38 +00:00
Tatsuhiro Tsujikawa 2176b68116 2010-08-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten ut_pex peer selection.
	* src/DefaultBtInteractive.cc
	* src/DefaultPeerStorage.cc
	* src/DefaultPeerStorage.h
	* src/PeerStorage.h
	* src/UTPexExtensionMessage.h
	* test/DefaultPeerStorageTest.cc
	* test/MockPeerStorage.h
	* test/UTPexExtensionMessageTest.cc
2010-08-04 12:25:46 +00:00
Tatsuhiro Tsujikawa 2bd5020f81 2010-08-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added bittorrent::packcompact() which replaces
	bittorrent::createcompact() and supports IPv6 addresses. Rewritten
	bittorrent::unpackcompact() and bittorrent::extractPeer() to
	support IPv6 addresses. Fixed added.f flags in ut_pex.
	* src/BtConstants.h
	* src/DHTFindNodeReplyMessage.cc
	* src/DHTGetPeersReplyMessage.cc
	* src/DHTMessageFactoryImpl.cc
	* src/DHTRoutingTableDeserializer.cc
	* src/DHTRoutingTableSerializer.cc
	* src/DHTTokenTracker.cc
	* src/DefaultBtAnnounce.cc
	* src/UTPexExtensionMessage.cc
	* src/bittorrent_helper.cc
	* src/bittorrent_helper.h
	* test/BittorrentHelperTest.cc
	* test/DHTFindNodeReplyMessageTest.cc
	* test/DHTGetPeersReplyMessageTest.cc
	* test/DHTMessageFactoryImplTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DefaultExtensionMessageFactoryTest.cc
	* test/UTPexExtensionMessageTest.cc
2010-08-03 11:44:24 +00:00
Tatsuhiro Tsujikawa 7958ce4366 2010-07-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added FTP EPSV and EPRT command support. aria2 issues these
	commands when address family of local socket is AF_INET6.
	* src/FtpConnection.cc
	* src/FtpConnection.h
	* src/FtpNegotiationCommand.cc
	* src/FtpNegotiationCommand.h
	* src/SocketCore.cc
	* src/SocketCore.h
	* test/FtpConnectionTest.cc
2010-07-30 14:45:35 +00:00
Tatsuhiro Tsujikawa 27e96877b7 2010-07-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten check for fallocate using AC_COMPILE_IFELSE.
	* configure.ac
	* m4/fallocate.m4
2010-07-27 14:37:25 +00:00
Tatsuhiro Tsujikawa 07f91a28de 2010-07-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error with OSX g++ 4.0.1
	* src/FileEntry.h
	* test/FileEntryTest.cc
2010-07-18 15:49:53 +00:00
Tatsuhiro Tsujikawa cd13647abe 2010-07-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Pass maxSplitSize as an argument, instead of member variable of
	DefaultPieceStorage. SegmentMan::getSegment(cuid_t,size_t index)
	was renamed to SegmentMan::getSegmentWithIndex(...)
	* src/AbstractCommand.cc
	* src/AbstractCommand.h
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/DownloadCommand.cc
	* src/FtpNegotiationCommand.cc
	* src/HttpResponseCommand.cc
	* src/PieceStorage.h
	* src/RequestGroup.cc
	* src/SegmentMan.cc
	* src/SegmentMan.h
	* src/UnknownLengthPieceStorage.cc
	* src/UnknownLengthPieceStorage.h
	* test/MockPieceStorage.h
	* test/SegmentManTest.cc
2010-07-17 14:36:18 +00:00
Tatsuhiro Tsujikawa 906215317a 2010-07-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --conditional-get option.  Download file only when the local
	file is older than remote file.  This function only works with
	HTTP(S) downloads only. It does not work if file size is specified
	in Metalink. It also ignores Content-Disposition header. If a
	control file exists, this option will be ignored. This function
	uses If-Modified-Since header to get only newer file
	conditionally. When getting modification time of local file, it
	uses user supplied filename(see --out option) or filename part in
	URI if --out is not specified.
	* doc/aria2c.1.txt
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/HttpResponse.cc
	* src/HttpResponseCommand.cc
	* src/OptionHandlerFactory.cc
	* src/TimeA2.cc
	* src/TimeA2.h
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/HttpResponseTest.cc
	* test/TimeTest.cc
2010-07-16 14:13:04 +00:00
Tatsuhiro Tsujikawa 55d98cff0b 2010-07-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
FeedbackURISelector now tries to select URI whose host is least
	used in aria2 globally. Reverted the previous change.
	* src/AdaptiveURISelector.cc
	* src/AdaptiveURISelector.h
	* src/CreateRequestCommand.cc
	* src/FeedbackURISelector.cc
	* src/FeedbackURISelector.h
	* src/FileEntry.cc
	* src/FileEntry.h
	* src/InOrderURISelector.cc
	* src/InOrderURISelector.h
	* src/RequestGroupMan.cc
	* src/RequestGroupMan.h
	* src/URISelector.h
	* src/a2algo.h
	* test/FeedbackURISelectorTest.cc
	* test/InOrderURISelectorTest.cc
2010-07-15 13:49:02 +00:00
Tatsuhiro Tsujikawa 1ddaaf7614 2010-07-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --min-split-size=SIZE option.  aria2 does not split less
	than 2*SIZE byte range.  For example, let's consider downloading
	20MiB file. If SIZE is 10M, aria2 can split file into 2 range
	[0-10MiB) and [10MiB-20MiB) and download it using 2 sources(if
	--split >= 2, of course).  If SIZE is 15M, since 2*15M > 20MiB,
	aria2 does not split file and download it using 1 source.
	* src/BitfieldMan.cc
	* src/BitfieldMan.h
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/OptionHandlerFactory.cc
	* src/RequestGroup.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/BitfieldManTest.cc
	* test/SegmentManTest.cc
2010-07-15 11:39:21 +00:00
Tatsuhiro Tsujikawa 55748de726 2010-07-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
FeedbackURISelector now tries to chooses URI which is not used in
	aria2 globally. If it is possible, it may return used URI.
	* src/AdaptiveURISelector.cc
	* src/AdaptiveURISelector.h
	* src/CreateRequestCommand.cc
	* src/FeedbackURISelector.cc
	* src/FeedbackURISelector.h
	* src/FileEntry.cc
	* src/FileEntry.h
	* src/InOrderURISelector.cc
	* src/InOrderURISelector.h
	* src/RequestGroupMan.cc
	* src/RequestGroupMan.h
	* src/URISelector.h
	* test/FeedbackURISelectorTest.cc
	* test/InOrderURISelectorTest.cc
2010-07-14 14:10:33 +00:00
Tatsuhiro Tsujikawa c99960aa33 2010-07-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
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
2010-07-14 11:39:05 +00:00
Tatsuhiro Tsujikawa 8274432f14 2010-07-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Set end byte in Range header if start byte > 0 to get more chance
	to pool socket.
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/DownloadCommand.cc
	* src/HttpDownloadCommand.cc
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/PieceStorage.h
	* src/UnknownLengthPieceStorage.h
	* test/DefaultPieceStorageTest.cc
	* test/HttpRequestTest.cc
	* test/MockPieceStorage.h
2010-07-12 11:55:23 +00:00
Tatsuhiro Tsujikawa 20cea7f693 2010-07-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed ChunkedDecoder. It does not read trailer and final CRLF.
	* src/ChunkedDecoder.cc
	* src/ChunkedDecoder.h
	* test/ChunkedDecoderTest.cc
2010-07-11 14:15:36 +00:00
Tatsuhiro Tsujikawa f285f66ac8 2010-07-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Send each CWD component of FTP URI in separate CWD command as
	described in RFC1738.
	* src/FtpConnection.cc
	* src/FtpConnection.h
	* src/FtpInitiateConnectionCommand.cc
	* src/FtpNegotiationCommand.cc
	* src/FtpNegotiationCommand.h
	* test/FtpConnectionTest.cc
2010-07-09 11:48:59 +00:00
Tatsuhiro Tsujikawa 52a6ea008e 2010-07-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that aria2 cannot handle %2F in FTP URI properly.
	If directory component starts with %2F which percent-encode of
	'/', client should issue CWD to absolute path, but aria2 does not
	do that. It just issues relative path and download fails.
	* src/FtpConnection.cc
	* test/FtpConnectionTest.cc
2010-07-08 16:40:21 +00:00
Tatsuhiro Tsujikawa 880af94348 2010-07-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Increased DOMAIN_EVICTION_TRIGGER to 2000
	* src/CookieStorage.cc
	* test/CookieStorageTest.cc
2010-07-08 15:20:21 +00:00
Tatsuhiro Tsujikawa 95af338895 2010-07-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added Chromium/Google Chrome Cookies file support. Thanks to
	gotrunks for original patch.
	* src/CookieStorage.cc
	* src/Makefile.am
	* src/Sqlite3CookieParser.cc
	* src/Sqlite3CookieParser.h
	* src/Sqlite3CookieParserImpl.cc
	* src/Sqlite3CookieParserImpl.h
	* src/Sqlite3MozCookieParser.cc: Removed
	* src/Sqlite3MozCookieParser.h: Removed
	* test/Makefile.am
	* test/Sqlite3CookieParserTest.cc
	* test/Sqlite3MozCookieParserTest.cc: Removed
	* test/chromium_cookies.sqlite
2010-07-08 15:18:15 +00:00
Tatsuhiro Tsujikawa a5cc350dcf 2010-07-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
When allocating disk space, for Linux system with fallocate()
	system call, first check file system supports fallocate.  This
	just run fallocate with small chunk and see it succeeds or fails.
	If it succeeds, use fallocate() to allocate entire file otherwise
	fall back to traditional slower method: writing zeros. This
	behavior is enabled in --file-allocation=prealloc, so this is
	enabled by default for most modern Linux.
	* configure.ac
	* src/AbstractDiskWriter.cc
	* src/AbstractDiskWriter.h
	* src/AbstractSingleDiskAdaptor.cc
	* src/AdaptiveFileAllocationIterator.cc
	* src/AdaptiveFileAllocationIterator.h
	* src/DefaultPieceStorage.cc
	* src/DiskAdaptor.cc
	* src/DiskAdaptor.h
	* src/FallocFileAllocationIterator.cc
	* src/Makefile.am
	* src/MultiFileAllocationIterator.cc
	* src/OptionHandlerFactory.cc
	* test/FallocFileAllocationIteratorTest.cc
	* test/Makefile.am
2010-07-04 15:03:35 +00:00
Tatsuhiro Tsujikawa 569892cad2 2010-06-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error without ssl library.
	* test/Metalink2RequestGroupTest.cc
2010-06-28 12:56:11 +00:00
Tatsuhiro Tsujikawa 985bc37c00 2010-06-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Don't set previousUri_ to "" on redirect.
	* src/Request.cc: redirectUri()
2010-06-27 14:36:25 +00:00
Tatsuhiro Tsujikawa 9d0eb8c08b 2010-06-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed unused getOverflow(). Added assertion in
	PiecedSegment::updateWrittenLength() to check updated written
	length does not exceed piece length.
	* src/GrowSegment.h
	* src/PiecedSegment.cc
	* src/PiecedSegment.h
	* src/Segment.h
	* test/SegmentTest.cc
2010-06-26 13:01:52 +00:00
Tatsuhiro Tsujikawa 4736e77acf 2010-06-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Request ut_metadata in end-game mode(in other words, more
	aggresively)
	* src/HandshakeExtensionMessage.cc
	* src/Peer.cc
	* src/Peer.h
	* src/PeerSessionResource.cc
	* src/PeerSessionResource.h
	* src/UTMetadataRequestFactory.cc
	* test/UTMetadataRequestFactoryTest.cc
2010-06-23 11:55:23 +00:00
Tatsuhiro Tsujikawa 769783dab4 2010-06-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made test code not use /tmp
	* test/CookieStorageTest.cc
	* test/DirectDiskAdaptorTest.cc
	* test/FallocFileAllocationIteratorTest.cc
	* test/FileEntryTest.cc
	* test/FileTest.cc
	* test/GZipDecoderTest.cc
	* test/MultiDiskAdaptorTest.cc
	* test/MultiFileAllocationIteratorTest.cc
	* test/RequestGroupManTest.cc
	* test/SignatureTest.cc
	* test/SingleFileAllocationIteratorTest.cc
	* test/UtilTest.cc
2010-06-22 12:28:37 +00:00
Tatsuhiro Tsujikawa 427577eed4 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that corrups file if segment returned from
	SegmetnMan::getCleanSegmentIfOwnerIsIdle() has writtenLength > 0.
	* src/DownloadCommand.cc
	* src/SegmentMan.cc
	* src/SegmentMan.h
	* test/SegmentManTest.cc
2010-06-21 14:02:51 +00:00
Tatsuhiro Tsujikawa ca4940622c 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Changed naming standards for class member variable: now it looks
	like var_ instead of _var.
2010-06-21 13:51:56 +00:00
Tatsuhiro Tsujikawa 9e9fb885d9 2010-06-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed PeerListProcessor. Its functionality is now moved to
	bittorrent_helper.h
	* src/DefaultBtAnnounce.cc
	* src/Makefile.am
	* src/PeerListProcessor.h: Removed
	* src/UTPexExtensionMessage.cc
	* src/bittorrent_helper.cc
	* src/bittorrent_helper.h
	* test/BittorrentHelperTest.cc
	* test/Makefile.am
	* test/PeerListProcessorTest.cc: Removed
2010-06-20 12:12:18 +00:00
Tatsuhiro Tsujikawa cb4e25e4b4 2010-06-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed BDE and bencode
2010-06-19 17:54:54 +00:00
Tatsuhiro Tsujikawa 8ba97188ce 2010-06-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Introduced ValueBase class, which is a replacement of BDE.  In
	this change ValueBase is used instead of BDE except DHT messages,
	UTMetadata messages and XML-RPC. They'll be replaced in the later
	commits. DownloadContext::_attrs is now ContextAttribute rather
	than BDE.
	* src/ActivePeerConnectionCommand.cc
	* src/AnnounceList.cc
	* src/AnnounceList.h
	* src/BtDependency.cc
	* src/BtRegistry.cc
	* src/BtSetup.cc
	* src/ConsoleStatCalc.cc
	* src/ContextAttribute.h
	* src/DefaultBtAnnounce.cc
	* src/DefaultBtInteractive.cc
	* src/DownloadContext.cc
	* src/DownloadContext.h
	* src/HandshakeExtensionMessage.cc
	* src/InitiateConnectionCommand.cc
	* src/LpdReceiveMessageCommand.cc
	* src/MSEHandshake.cc
	* src/Makefile.am
	* src/Makefile.in
	* src/PeerInteractionCommand.cc
	* src/PeerListProcessor.h
	* src/ProtocolDetector.cc
	* src/RequestGroup.cc
	* src/RequestGroupMan.cc
	* src/TorrentAttribute.h
	* src/TrackerWatcherCommand.cc
	* src/UTMetadataDataExtensionMessage.cc
	* src/UTMetadataPostDownloadHandler.cc
	* src/UTMetadataRequestExtensionMessage.cc
	* src/ValueBase.cc
	* src/ValueBase.h
	* src/XmlRpcMethodImpl.cc
	* src/XmlRpcMethodImpl.h
	* src/bencode2.cc
	* src/bencode2.h
	* src/bittorrent_helper.cc
	* src/bittorrent_helper.h
	* src/download_helper.cc
	* src/magnet.cc
	* src/magnet.h
	* test/AnnounceListTest.cc
	* test/Bencode2Test.cc
	* test/BencodeTest.cc
	* test/BittorrentHelperTest.cc
	* test/BtDependencyTest.cc
	* test/BtRegistryTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/DefaultBtProgressInfoFileTest.cc
	* test/HandshakeExtensionMessageTest.cc
	* test/MSEHandshakeTest.cc
	* test/MagnetTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/RequestGroupManTest.cc
	* test/UTMetadataDataExtensionMessageTest.cc
	* test/UTMetadataPostDownloadHandlerTest.cc
	* test/UTMetadataRequestExtensionMessageTest.cc
	* test/ValueBaseTest.cc
	* test/XmlRpcMethodTest.cc
2010-06-18 14:47:09 +00:00
Tatsuhiro Tsujikawa 3dfbec0f9f 2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten DHTMessageCallback using Visitor pattern. Eliminated
	dynamic_pointer_cast.
	* src/DHTMessageCallbackImpl.cc: Removed
	* src/DHTMessageReceiver.cc
	* src/DHTAbstractNodeLookupTask.h
	* src/DHTAnnouncePeerReplyMessage.h
	* src/DHTReplaceNodeTask.h
	* src/DHTFindNodeReplyMessage.cc
	* src/DHTGetPeersReplyMessage.h
	* src/DHTPeerLookupTask.h
	* src/DHTMessageCallbackImpl.h: Removed
	* src/DHTMessageFactory.h
	* src/DHTNodeLookupTaskCallback.h
	* src/DHTMessageTracker.h
	* src/DHTMessageCallbackListener.h: Removed
	* src/DHTGetPeersReplyMessage.cc
	* src/DHTMessageCallback.h
	* src/DHTAnnouncePeerReplyMessage.cc
	* src/DHTNodeLookupTask.h
	* src/DHTReplaceNodeTask.cc
	* src/DHTPeerLookupTaskCallback.cc
	* src/DHTMessageTracker.cc
	* src/DHTPingReplyMessage.cc
	* src/DHTPingTask.cc
	* src/DHTMessageFactoryImpl.h
	* src/Makefile.am
	* src/DHTNodeLookupTask.cc
	* src/DHTPeerLookupTaskCallback.h
	* src/DHTPeerLookupTask.cc
	* src/DHTMessageReceiver.h
	* src/DHTMessageFactoryImpl.cc
	* src/DHTResponseMessage.h
	* src/DHTFindNodeReplyMessage.h
	* src/DHTPingReplyMessageCallback.h
	* src/Makefile.in
	* src/DHTBucketRefreshTask.cc
	* src/DHTNodeLookupTaskCallback.cc
	* src/DHTPingTask.h
	* src/DHTPingReplyMessage.h
	* src/DHTAbstractNodeLookupTask.cc: Removed
	* test/DHTMessageTrackerTest.cc
	* test/DHTPingMessageTest.cc
	* test/DHTGetPeersMessageTest.cc
	* test/MockDHTMessage.h
	* test/MockDHTMessageFactory.h
	* test/DHTFindNodeMessageTest.cc
	* test/MockDHTMessageCallback.h
	* test/DHTAnnouncePeerMessageTest.cc
2010-06-13 11:25:21 +00:00
Tatsuhiro Tsujikawa 1dcf842ff4 2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed member variables of XmlRpcResponse
	* src/XmlRpcMethodImpl.cc
	* src/XmlRpcResponse.cc
	* src/XmlRpcResponse.h
	* test/XmlRpcMethodTest.cc
2010-06-13 02:30:32 +00:00
Tatsuhiro Tsujikawa 6fdabb6f9c 2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed member variables
	* src/HttpServerBodyCommand.cc
	* src/XmlRpcMethodImpl.cc
	* src/XmlRpcMethodImpl.h
	* src/XmlRpcRequest.h
	* test/XmlRpcMethodTest.cc
	* test/XmlRpcRequestProcessorTest.cc
2010-06-13 02:26:34 +00:00
Tatsuhiro Tsujikawa 6127307c54 2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made DHTNodeLookupEntry struct
	* src/DHTAbstractNodeLookupTask.cc
	* src/DHTIDCloser.h
	* src/DHTNodeLookupEntry.cc
	* src/DHTNodeLookupEntry.h
	* src/DHTPeerLookupTask.cc
	* test/DHTIDCloserTest.cc
2010-06-13 02:13:43 +00:00
Tatsuhiro Tsujikawa 55258bc019 2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed member variables
	* src/ActivePeerConnectionCommand.cc
	* src/BtLeecherStateChoke.cc
	* src/BtPieceMessage.cc
	* src/BtPortMessage.cc
	* src/BtSeederStateChoke.cc
	* src/DHTGetPeersReplyMessage.cc
	* src/DefaultBtInteractive.cc
	* src/DefaultPeerStorage.cc
	* src/HandshakeExtensionMessage.cc
	* src/LpdReceiveMessageCommand.cc
	* src/Peer.cc
	* src/Peer.h
	* src/PeerAbstractCommand.cc
	* src/PeerInitiateConnectionCommand.cc
	* src/PeerListenCommand.cc
	* src/SimpleBtMessage.cc
	* src/UTPexExtensionMessage.cc
	* src/XmlRpcMethodImpl.cc
	* test/DHTAnnouncePeerMessageTest.cc
	* test/DHTGetPeersMessageTest.cc
	* test/DHTGetPeersReplyMessageTest.cc
	* test/DHTMessageFactoryImplTest.cc
	* test/DHTPeerAnnounceEntryTest.cc
	* test/DHTPeerAnnounceStorageTest.cc
	* test/DefaultPeerStorageTest.cc
	* test/HandshakeExtensionMessageTest.cc
	* test/LpdMessageReceiverTest.cc
	* test/PeerListProcessorTest.cc
	* test/PeerTest.cc
	* test/UTPexExtensionMessageTest.cc
2010-06-13 01:53:49 +00:00
Tatsuhiro Tsujikawa 8d1da8bd3e 2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made public member variable in Metalinker private
	* src/MetalinkParserController.cc
	* src/Metalinker.cc
	* src/Metalinker.h
	* test/MetalinkParserControllerTest.cc
	* test/MetalinkProcessorTest.cc
	* test/MetalinkerTest.cc
2010-06-12 14:39:26 +00:00
Tatsuhiro Tsujikawa 8d6378b675 2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed member variables in SegmentMan
	* src/RequestGroup.cc
	* src/RequestGroupMan.cc
	* src/SegmentMan.cc
	* src/SegmentMan.h
	* src/XmlRpcMethodImpl.cc
	* test/BtDependencyTest.cc
2010-06-12 13:49:39 +00:00
Tatsuhiro Tsujikawa 4f7746a89c 2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed member variables. Removed unused member variable.
	* src/DefaultPeerStorage.cc
	* src/DefaultPeerStorage.h
	* src/RequestGroup.cc
	* test/DefaultPeerStorageTest.cc
2010-06-12 08:50:50 +00:00
Tatsuhiro Tsujikawa f7001132bc 2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made protected member variable private. Added accessor funcs.
	* src/DHTAbstractMessage.cc
	* src/DHTAbstractMessage.h
	* src/DHTAnnouncePeerMessage.cc
	* src/DHTAnnouncePeerMessage.h
	* src/DHTAnnouncePeerReplyMessage.cc
	* src/DHTAnnouncePeerReplyMessage.h
	* src/DHTFindNodeMessage.cc
	* src/DHTFindNodeMessage.h
	* src/DHTFindNodeReplyMessage.cc
	* src/DHTFindNodeReplyMessage.h
	* src/DHTGetPeersMessage.cc
	* src/DHTGetPeersMessage.h
	* src/DHTGetPeersReplyMessage.cc
	* src/DHTGetPeersReplyMessage.h
	* src/DHTMessage.h
	* src/DHTPingMessage.cc
	* src/DHTPingMessage.h
	* src/DHTPingReplyMessage.cc
	* src/DHTPingReplyMessage.h
	* src/DHTQueryMessage.cc
	* src/DHTQueryMessage.h
	* src/DHTResponseMessage.cc
	* src/DHTResponseMessage.h
	* src/DHTUnknownMessage.cc
	* src/DHTUnknownMessage.h
	* test/MockDHTMessage.h
2010-06-12 02:27:14 +00:00
Tatsuhiro Tsujikawa b914f6d810 2010-06-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made protected member variable private. Added accessor funcs.
	* src/AbstractSingleDiskAdaptor.cc
	* src/AbstractSingleDiskAdaptor.h
	* src/DirectDiskAdaptor.cc
	* src/DirectDiskAdaptor.h
	* src/DiskAdaptor.cc
	* src/DiskAdaptor.h
	* src/MultiDiskAdaptor.cc
	* src/MultiDiskAdaptor.h
	* src/MultiFileAllocationIterator.cc
	* src/MultiFileAllocationIterator.h
	* test/BtBitfieldMessageTest.cc
	* test/BtHaveAllMessageTest.cc
	* test/BtHaveMessageTest.cc
2010-06-11 12:49:14 +00:00
Tatsuhiro Tsujikawa 7cd9b21937 2010-06-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made public member variables of DownloadEngine private. Added
	accessor funcs.
2010-06-08 14:11:36 +00:00
Tatsuhiro Tsujikawa fdf5c0109b 2010-06-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.9.4
	* configure.ac
	* doc/aria2c.1.txt
2010-06-01 12:56:21 +00:00
Tatsuhiro Tsujikawa 1a29132b91 2010-05-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added totalLength, completedLength, uploadLength, bitfield,
	downloadSpeed, uploadSpeed, infoHash, numSeeders, pieceLength,
	numPieces, connections and dir to the response of
	aria2.tellStopped XML-RPC method.  aria2.tellWaiting now always
	returns numSeeders for BitTorrent download.
	* src/DownloadResult.h
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/XmlRpcMethodImpl.cc
	* test/XmlRpcMethodTest.cc
2010-05-22 11:50:47 +00:00
Tatsuhiro Tsujikawa 8f3cdfb2de 2010-05-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed DownloadResult's ctor because it has many args.
	* src/DownloadResult.h
	* src/RequestGroup.cc
	* test/XmlRpcMethodTest.cc
2010-05-20 12:16:50 +00:00
Tatsuhiro Tsujikawa 83465ff83d 2010-05-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
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
2010-05-14 15:18:59 +00:00
Tatsuhiro Tsujikawa b305edd7c5 2010-05-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Left only IANA hash function textual name in messageDigest.cc.
	Assign only IANA hash function textual name to Checksum and
	ChunkChecksum. Fixed the value of MessageDigestContext::MD5.
	* src/Checksum.h
	* src/MetalinkParserController.cc
	* src/messageDigest.cc
	* src/messageDigest.h
	* test/IteratableChecksumValidatorTest.cc
	* test/IteratableChunkChecksumValidatorTest.cc
	* test/MessageDigestHelperTest.cc
	* test/Metalink2RequestGroupTest.cc
	* test/MetalinkProcessorTest.cc
2010-05-14 14:11:56 +00:00
Tatsuhiro Tsujikawa 460ee92644 2010-05-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
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
2010-05-06 14:18:29 +00:00
Tatsuhiro Tsujikawa 2bcf648102 2010-05-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that if filename in Content-Disposition header
	includes ';', aria2 cuts filename after ';'.
	* src/util.cc
	* test/UtilTest.cc
2010-05-06 12:49:50 +00:00
Tatsuhiro Tsujikawa a02c6238bf 2010-04-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated doc
	* test/array_funTest.cc
2010-04-27 14:18:03 +00:00
Tatsuhiro Tsujikawa 7e22cc38bb 2010-04-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Implemented clock_gettime() using timeGetTime in mingw.
	* configure.ac
	* src/Makefile.am
	* src/a2time.h
	* src/clock_gettime_mingw.cc
	* src/clock_gettime_mingw.h
	* src/timespec.h
	* test/Makefile.am
2010-04-13 15:36:56 +00:00
Tatsuhiro Tsujikawa 5feb750f22 2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added missing serialize_session.meta4 to EXTRA_DIST
	* test/Makefile.am
2010-04-12 14:50:30 +00:00
Tatsuhiro Tsujikawa 15bb26cac8 2010-04-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added aria2.pauseAll, aria2.forcePauseAll and aria2.unpauseAll
	XML-RPC method.
	* doc/aria2c.1.txt
	* src/XmlRpcMethodFactory.cc
	* src/XmlRpcMethodImpl.cc
	* src/XmlRpcMethodImpl.h
	* test/XmlRpcMethodTest.cc
2010-04-11 14:46:07 +00:00
Tatsuhiro Tsujikawa 0529e78187 2010-04-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use clock_gettime(CLOCK_MONOTONIC, ...) if it is available and
	usable to prevent from aria2 from being affected by system time
	change.
2010-04-11 08:28:22 +00:00
Tatsuhiro Tsujikawa 5cd0108f93 2010-04-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --save-session=FILE option.  This option saves
	error/unfinished downloads to FILE on exit.  You can pass this
	output file to aria2c with -i option on restart. Please note that
	downloads added by aria2.addTorrent and aria2.addMetalink XML-RPC
	method are not saved.
	* src/BtPostDownloadHandler.cc
	* src/DownloadResult.h
	* src/Makefile.am
	* src/MetadataInfo.cc
	* src/MetadataInfo.h
	* src/Metalink2RequestGroup.cc
	* src/MetalinkPostDownloadHandler.cc
	* src/MultiUrlRequestInfo.cc
	* src/OptionHandlerFactory.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/SessionSerializer.cc
	* src/SessionSerializer.h
	* src/UTMetadataPostDownloadHandler.cc
	* src/download_helper.cc
	* src/download_helper.h
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/Makefile.am
	* test/SessionSerializerTest.cc
	* test/XmlRpcMethodTest.cc
	* test/serialize_session.meta4
2010-04-08 12:54:14 +00:00
Tatsuhiro Tsujikawa 0e060f0e8b 2010-04-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that web-seed URI is not percent-encoded.
	* src/a2functional.h
	* src/bittorrent_helper.cc
	* test/BittorrentHelperTest.cc
	* test/url-list-multiFile.torrent
	* test/url-list-singleFileEndsWithSlash.torrent
2010-04-03 04:02:14 +00:00
Tatsuhiro Tsujikawa 6996f07f5f 2010-04-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Don't send "Accept: default, gzip" by default. This is because
	some server responds with "Content-Encoding: gzip" for files which
	itself is gzipped file and aria2 inflates them. This is a problem
	if user don't want to inflate the file. Apparently this is server
	configuration error, but I cannot do anything about this. So turn
	this off.  Added --http-accept-gzip option. If true is given to
	this option, aria2 sends 'Accept: deflate, gzip' request header
	and inflates response if remote server responds with
	'Content-Encoding: gzip' or 'Content-Encoding: deflate'.  This
	indicates we removed extension tgz hack in order not to inflate
	files with tgz extensions.
	* doc/aria2c.1.txt
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/HttpResponseCommand.cc
	* src/OptionHandlerFactory.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/HttpRequestTest.cc
2010-04-02 14:16:10 +00:00
Tatsuhiro Tsujikawa d67f4cefac 2010-04-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added download_helper.{cc,h} to SRCS
	* src/Makefile.am
	* test/Makefile.am
2010-04-01 09:13:10 +00:00
Tatsuhiro Tsujikawa e7e214fef2 2010-03-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --dht-message-timeout option.
	* doc/aria2c.1.txt
	* src/DHTConstants.h
	* src/DHTMessageDispatcherImpl.cc
	* src/DHTMessageDispatcherImpl.h
	* src/DHTMessageTracker.cc
	* src/DHTMessageTracker.h
	* src/DHTReplaceNodeTask.h
	* src/DHTSetup.cc
	* src/DHTTaskFactoryImpl.cc
	* src/DHTTaskFactoryImpl.h
	* src/OptionHandlerFactory.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/DHTMessageTrackerTest.cc
2010-03-30 14:46:26 +00:00
Tatsuhiro Tsujikawa abe1e9843c 2010-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --always-resume and --max-resume-failure-tries option.  If
	--always-resume=false is given, when all given URIs does not
	support resume or aria2 encounters N URIs which does not support
	resume
        (N is the value specified using --max-resume-failure-tries
	option), aria2 download file from scratch.  The default behavior
	is --always-resume=true, which means if all URIs do not support
	resume, download fails. I think this is OK because user normally
	don't like to see that partially downloaded file is
	overwritten(this is particularly true if file size is big).  This
	option is useful when aria2 is used as download backend and
	graceful falling back to overwritten behavior is preferable.
	Added exit status value 8, which means download failed because
	server did not support resume.
	* src/AbstractCommand.cc
	* src/DefaultPieceStorage.cc
	* src/DownloadCommand.cc
	* src/DownloadResultCode.h
	* src/FileEntry.h
	* src/FtpNegotiationCommand.cc
	* src/HttpResponse.cc
	* src/HttpResponseCommand.cc
	* src/OptionHandlerFactory.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/SegmentMan.cc
	* src/SegmentMan.h
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/DefaultPieceStorageTest.cc
	* test/SegmentManTest.cc
2010-03-28 07:23:33 +00:00
Tatsuhiro Tsujikawa 886f8ee58e 2010-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed arrayLength. Defined A2_ARRAY_LEN as macro to calculate
	size of array at compile time.
	* src/array_fun.h
	* test/BitfieldManTest.cc
	* test/BtPortMessageTest.cc
	* test/DHTRoutingTableDeserializerTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DownloadHelperTest.cc
	* test/LongestSequencePieceSelectorTest.cc
	* test/MultiDiskAdaptorTest.cc
	* test/OptionParserTest.cc
	* test/PriorityPieceSelectorTest.cc
	* test/array_funTest.cc
2010-03-25 14:22:43 +00:00