Commit Graph

2670 Commits (9a67929d8ceed4ca49a3e49c7666a55e482aad9d)

Author SHA1 Message Date
Tatsuhiro Tsujikawa af207e6cd8 2010-10-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Print message when performing slow file allocation at first time.
	* src/SingleFileAllocationIterator.cc
	* src/SingleFileAllocationIterator.h
2010-10-03 13:31:58 +00:00
Tatsuhiro Tsujikawa 32d4ffa8ee 2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error on OpenBSD4.7(i386). In openssl.m4, we first
	search libcrypto and then libssl because libssl depends on
	libcrypto on OpenBSD.
	* src/Netrc.cc
	* src/Netrc.h
	* src/Triplet.h
	* src/openssl.m4
2010-10-03 09:19:33 +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 7375a778c4 2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that FtpFinishDownloadCommand does not handle
	timeout. This means it waits for the remote server to send "226
	Transfer Complete" message *without* its own timeout until the
	remote server shutdowns connection(we can detect EOF in this
	case).
	* src/AbstractCommand.h
	* src/FtpFinishDownloadCommand.cc
2010-10-02 10:12:10 +00:00
Tatsuhiro Tsujikawa 86d4d1963a 2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Code cleanup util::percentEncode()
	* src/util.cc
2010-10-02 08:31:28 +00:00
Tatsuhiro Tsujikawa 29d40a666f 2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made string literal static std::string in
	util::detectDirTraversal().
	* src/util.cc
2010-10-02 08:29:15 +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 6a07182b0d 2010-09-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use class instead of typename for Triplet template parameter.
	* src/Triplet.h
2010-09-26 06:56:26 +00:00
Tatsuhiro Tsujikawa 41a096035c 2010-09-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten TripletGet.
	* src/Triplet.h
2010-09-26 06:54:25 +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 ac7d8dc483 2010-09-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made small optimization.
	* src/DownloadCommand.cc
2010-09-23 11:49:37 +00:00
Tatsuhiro Tsujikawa aea9199b40 2010-09-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Reset download start time of PeerStat because it is started before
	file allocation begins. Without reset, we have incorrect download
	time and aria2 wrongly determines that download speed is too low
	if --lowest-speed-limit is used.
	* src/StreamFileAllocationEntry.cc
2010-09-23 10:10:16 +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 f11ac122ac 2010-09-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Release 1.10.3
2010-09-15 13:32:08 +00:00
Tatsuhiro Tsujikawa 32dc62f240 Updated 2010-09-15 12:52:52 +00:00
Tatsuhiro Tsujikawa e59ec2f926 2010-09-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated po templates.
	* po/aria2.pot
2010-09-15 12:51:47 +00:00
Tatsuhiro Tsujikawa 6136272fb2 2010-09-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added note to --enable-http-pipelining option.
	* doc/aria2c.1.txt
2010-09-15 12:39:55 +00:00
Tatsuhiro Tsujikawa 50a89e2592 2010-09-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Print a message in console when download is not complete.
	* src/RequestGroupMan.cc
2010-09-15 12:37:02 +00:00
Tatsuhiro Tsujikawa 01bdd96bb4 Updated for 1.10.3 release 2010-09-15 12:30:31 +00:00
Tatsuhiro Tsujikawa 1d2080361d 2010-09-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Don't set error in ServerStat just because resource is not
	there. We can still use the server for other resources.
	* src/AbstractCommand.cc
2010-09-15 12:22:31 +00:00
Tatsuhiro Tsujikawa 2c3411f709 2010-09-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Disabled --dry-run in multi-file download for now.
	* src/RequestGroup.cc
2010-09-15 12:15:54 +00:00
Tatsuhiro Tsujikawa a27968beda 2010-09-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that a file gets overwritten if -V is given and no
	hash is provided. Fixed the bug that --dry-run leads download
	error. Added RequestGroup::createCheckIntegrityEntry() which
	correctly creates CheckIntegrityEntry objects and open files based
	on -V option and the existence of control file.
	* src/AbstractCommand.cc
	* src/AbstractCommand.h
	* src/ChecksumCheckIntegrityEntry.cc
	* src/DownloadContext.cc
	* src/DownloadContext.h
	* src/FtpNegotiationCommand.cc
	* src/HttpResponseCommand.cc
	* src/PieceHashCheckIntegrityEntry.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/RequestGroupEntry.cc
	* src/RequestGroupEntry.h
2010-09-15 11:46:25 +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 1906832f43 2010-09-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error without zlib
	* src/HttpResponseCommand.cc
2010-09-13 13:31:09 +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 7f9e70e5c8 2010-09-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated doc
	* src/FtpNegotiationCommand.cc
	* src/HttpResponseCommand.cc
	* src/RequestGroup.cc
2010-09-13 11:53:38 +00:00
Tatsuhiro Tsujikawa 97953dd1ae 2010-09-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that error occurs when downloading zero-length file.
	* src/FtpNegotiationCommand.cc
	* src/HttpResponseCommand.cc
2010-09-13 11:47:04 +00:00
Tatsuhiro Tsujikawa 5bf8a53b3f 2010-09-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error without OpenSSL/GnuTLS.
	* src/DownloadCommand.cc
2010-09-11 15:57:41 +00:00
Tatsuhiro Tsujikawa 70ebb788b2 2010-09-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error without BitTorrent support and OpenSSL/GnuTLS.
	* src/DownloadCommand.cc
	* src/DownloadCommand.h
	* src/RequestGroup.cc
2010-09-11 15:54:53 +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 880c6b5498 2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated autoconf 2.67
	* configure.ac
2010-09-11 12:28:34 +00:00
Tatsuhiro Tsujikawa 350b6f616c 2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.10.3
	* configure.ac
	* doc/aria2c.1.txt
2010-09-11 12:23:12 +00:00
Tatsuhiro Tsujikawa 90c927af74 2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated man page according to changes in options.
	* doc/aria2c.1.txt
2010-09-11 12:21:10 +00:00
Tatsuhiro Tsujikawa f82ffef460 2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added short option -k for --min-split-size option and -x for
	--max-connection-per-server option. Raised maximum value of
	--max-connection-per-server up to 16.
	* src/OptionHandlerFactory.cc
	* src/usage_text.h
2010-09-11 12:15:41 +00:00
Tatsuhiro Tsujikawa 80edde0205 2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use uri::parse instead of Request::setUri() where just URI parser
	is needed.
	* src/AbstractCommand.cc
	* src/AdaptiveURISelector.cc
	* src/DefaultBtAnnounce.cc
	* src/FeedbackURISelector.cc
	* src/FileEntry.cc
	* src/HttpResponseCommand.cc
	* src/ProtocolDetector.cc
	* src/Request.cc
	* src/RequestGroupMan.cc
2010-09-11 12:09:19 +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 cb796432ec 2010-09-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Store last error of removed download result so that it can be used
	as exit status.
	* src/RequestGroupMan.cc
2010-09-10 15:03:40 +00:00
Tatsuhiro Tsujikawa f26685ded1 2010-09-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --max-download-result=NUM option. This option sets maximum
	number of download result kept in memory. The download results are
	completed/error/ removed downloads. The download results are
	stored in FIFO queue and it can store at most NUM download
	results. When queue is full and new download result is created,
	oldest download result is removed from the front of the queue and
	new one is pushed to the back. Setting big number in this option
	may result high memory consumption after thousands of
	downloads. Specifying 0 means no download result is kept.  Default
	value is 1000.
	* src/OptionHandlerFactory.cc
	* src/RequestGroupMan.cc
	* src/RequestGroupMan.h
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
2010-09-10 14:13:50 +00:00
Tatsuhiro Tsujikawa 32e3ebf112 2010-09-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Check hash(hash for entire file, not piece hash) if
	--check-integrity option is given and file is
	downloaded(determined by file length). If it fails, re-download
	file.
	* src/AbstractCommand.cc
	* src/ChecksumCheckIntegrityEntry.cc
	* src/ChecksumCheckIntegrityEntry.h
	* src/FtpNegotiationCommand.cc
	* src/HttpResponseCommand.cc
	* src/RequestGroup.cc
2010-09-10 11:52:16 +00:00
Tatsuhiro Tsujikawa 6e7dd1650e 2010-09-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Make finished() return true only when offset == totalLength.
	* src/AdaptiveFileAllocationIterator.cc
	* src/SingleFileAllocationIterator.cc
2010-09-10 11:46:43 +00:00
Tatsuhiro Tsujikawa d687886c24 2010-09-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Moved connectedHostname, connectedAddr and connectedPort to
	Request object. Mark cached IP address bad on timeout to allow
	aria2 to renew IP address cache.
	* src/AbstractCommand.cc
	* src/AbstractProxyRequestCommand.cc
	* src/AbstractProxyRequestCommand.h
	* src/FtpInitiateConnectionCommand.cc
	* src/FtpNegotiationCommand.cc
	* src/FtpNegotiationCommand.h
	* src/HttpInitiateConnectionCommand.cc
	* src/HttpRequestCommand.cc
	* src/HttpRequestCommand.h
	* src/InitiateConnectionCommand.cc
	* src/InitiateConnectionCommand.h
	* src/Request.cc
	* src/Request.h
2010-09-09 12:00:42 +00:00
Tatsuhiro Tsujikawa 420500f6bf 2010-09-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Call RequestGroupMan::fillRequestGroupFromReserver() repeatedly
	while RequestGroupMan::requestQueueCheck() is true.
	* src/FillRequestGroupCommand.cc
2010-09-08 14:42:03 +00:00
Tatsuhiro Tsujikawa c51815dd52 2010-09-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use const ref
	* src/MultiUrlRequestInfo.cc
2010-09-08 14:39:34 +00:00
Tatsuhiro Tsujikawa 32e1aa1b59 2010-09-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that aria2 reports error and exits with non-zero
	status when file is already downloaded.
	* src/FtpNegotiationCommand.cc
	* src/HttpResponseCommand.cc
	* src/RequestGroup.cc
2010-09-08 14:38:32 +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 f5b3a820ef 2010-09-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Parse original URI when removing same host.
	* src/HttpResponseCommand.cc
2010-09-06 14:52:19 +00:00