Commit Graph

2236 Commits (7e22cc38bbb415a65c9b852316cd6b4c2d1edd4b)

Author SHA1 Message Date
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 aa08af9928 2010-04-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Ensure that std::ofstream is destroyed before renaming.
	* src/SessionSerializer.cc
	* src/util.cc
2010-04-13 15:23:31 +00:00
Tatsuhiro Tsujikawa c415eb081e 2010-04-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that user specified path is escaped using
	util::escapePath() where it should not.
	* src/DownloadContext.cc
	* src/DownloadContext.h
2010-04-13 12:51:52 +00:00
Tatsuhiro Tsujikawa 1f02b65460 2010-04-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Hold reference to PieceStorage when paused in order to provide
	progress information via XML-RPC.
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/RequestGroupMan.cc
2010-04-13 12:39:09 +00:00
Tatsuhiro Tsujikawa a605048900 2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Defined struct timespec if it is not available.
	* src/a2time.h
2010-04-12 15:59:42 +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 8d272f5d19 2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error without BitTorrent support.
	* src/Metalink2RequestGroup.cc
2010-04-12 14:41:56 +00:00
Tatsuhiro Tsujikawa 6a0c23b44d 2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error on Mac OS X
	* src/TimerA2.h
2010-04-12 14:33:26 +00:00
Tatsuhiro Tsujikawa 473d1ff6b5 2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added warning for the system which lacks clock_gettime with
	CLOCK_MONOTONIC.
	* src/MultiUrlRequestInfo.cc
	* src/TimerA2.cc
	* src/TimerA2.h
2010-04-12 13:05:41 +00:00
Tatsuhiro Tsujikawa b2c03934a8 2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed redundant method call for DownloadEngine.
	* src/DownloadCommand.cc
2010-04-12 12:57:54 +00:00
Tatsuhiro Tsujikawa 70664af0ad 2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that hash check hangs when aria2.pause is issued
	while aria2 is checking piece hashes.  Fixed the bug that the
	download is paused after file allocation completion even if
	aria2.pause is issued during file allocation.
	* src/CheckIntegrityCommand.cc
	* src/FileAllocationCommand.cc
2010-04-11 16:17:16 +00:00
Tatsuhiro Tsujikawa 6e9a25798c 2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added nsl to search-libs for getaddrinfo on opensolaris
	* configure.ac
2010-04-11 15:57:45 +00:00
Tatsuhiro Tsujikawa f2697552ae 2010-04-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error on opensolaris
	* configure.ac
	* src/Logger.h
	* src/GZipEncoder.h
2010-04-11 15:44:37 +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 2e6a517aaa 2010-04-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added aria2.forcePause XML-RPC command.
	* src/XmlRpcMethodFactory.cc
	* src/XmlRpcMethodImpl.cc
	* src/XmlRpcMethodImpl.h
2010-04-11 09:39:46 +00:00
Tatsuhiro Tsujikawa f02e08629e 2010-04-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use global::wallclock
	* src/DHTBucket.cc
	* src/DHTMessageTrackerEntry.cc
	* src/DHTMessageTrackerEntry.h
	* src/DefaultBtInteractive.cc
	* src/Peer.cc
	* src/PeerAbstractCommand.cc
	* src/PeerStat.h
	* src/RequestSlot.h
	* src/TimeBasedCommand.cc
2010-04-11 08:57:16 +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 bf0cf1f5d9 2010-04-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added aria2.pause and aria2.unpause XML-RPC method.  aria2.pause
	pauses the download denoted by gid. gid is of type string.  The
	status of paused download becomes "paused" and the download is
	placed on the first position of waiting queue. As long as the
	status is "paused", the download is not started. To change status
	to "waiting", use aria2.unpause method. This method returns GID of
	paused download.  aria2.unpause changes the status of the download
	denoted by gid from "paused" to "waiting". This makes the download
	eligible to restart. gid is of type string. This method returns
	GID of unpaused download.
	* doc/aria2c.1.txt
	* src/DownloadContext.cc
	* src/FileEntry.cc
	* src/OptionHandlerFactory.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/RequestGroupMan.cc
	* src/XmlRpcMethodFactory.cc
	* src/XmlRpcMethodImpl.cc
	* src/XmlRpcMethodImpl.h
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
2010-04-08 16:02: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 dd7590f927 2010-04-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that FTP data connection is not established via
	proxy when --ftp-proxy is defined and --ftp-pasv=true and
	--proxy-method=tunnel.
	* src/AbstractCommand.cc
	* src/AbstractCommand.h
	* src/FtpNegotiationCommand.cc
	* src/FtpNegotiationCommand.h
	* src/InitiateConnectionCommand.cc
2010-04-06 16:09:24 +00:00
Tatsuhiro Tsujikawa 538c463fc0 Updated for 1.9.1 release 2010-04-04 11:48:11 +00:00
Tatsuhiro Tsujikawa 2c617e8774 2010-04-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated po templates.
	* po/aria2.pot
2010-04-03 15:34:21 +00:00
Tatsuhiro Tsujikawa f98319469f 2010-04-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.9.1
	* configure.ac
2010-04-03 14:13:26 +00:00
Tatsuhiro Tsujikawa d4b8522ad3 2010-04-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added shutdown and forceShutdown to aria2rpc
	* doc/xmlrpc/aria2rpc
2010-04-03 08:39:58 +00:00
Tatsuhiro Tsujikawa a49c853297 2010-04-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Changed error message.
	* src/XmlRpcMethod.cc
2010-04-03 04:31:37 +00:00
Tatsuhiro Tsujikawa 3139b5fe48 2010-04-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added bt-tracker-timeout, bt-tracker-connect-timeout,
	always-resume, max-resume-failure-tries and http-accept-gzip to -i
	list options.
	* doc/aria2c.1.txt
	* doc/xmlrpc/aria2rpc
	* src/download_helper.cc
2010-04-03 04:25:29 +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 919255b4db 2010-04-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added aria2.shutdown and aria2.forceShutdown XML-RPC method.
	These methods, as their name implies, shutdown aria2.  These
	methods are useful for Windows because it lacks signal mechanism.
	* doc/aria2c.1.txt
	* src/TimedHaltCommand.cc
	* src/XmlRpcMethodFactory.cc
	* src/XmlRpcMethodImpl.cc
	* src/XmlRpcMethodImpl.h
2010-04-02 14:50:33 +00:00
Tatsuhiro Tsujikawa 730f7449ae 2010-04-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added forceHalt argument to TimedHaltCommand.
	Added requestForceHalt() to DownloadEngine.
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/TimedHaltCommand.cc
	* src/TimedHaltCommand.h
2010-04-02 14:23:59 +00:00
Tatsuhiro Tsujikawa 4c694b9585 2010-04-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Possible fix for chunked encoding with Content-Length.
	* src/HttpResponseCommand.cc
2010-04-02 14:19:11 +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 5cc28b2d80 2010-04-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made aria2 not send
	"application/metalink4+xml,application/metalink+xml" in Accept
	header for web-seeding URIs and tracker request.
	* src/Metalink2RequestGroup.cc
	* src/TrackerWatcherCommand.cc
	* src/download_helper.cc
	* src/util.cc
	* src/util.h
2010-04-01 15:41:53 +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 68156ef258 2010-03-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --bt-tracker-connect-timeout and --bt-tracker-timeout
	option.
	* doc/aria2c.1.txt
	* src/OptionHandlerFactory.cc
	* src/TrackerWatcherCommand.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
2010-03-30 14:17:16 +00:00
Tatsuhiro Tsujikawa 2c20f588c8 2010-03-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Documented that specifying --seed-time=0 disables seeding after
	download completed.
	* doc/aria2c.1.txt
2010-03-30 13:10:25 +00:00
Tatsuhiro Tsujikawa 613e832dac 2010-03-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Code cleanup
	* src/BtSetup.cc
2010-03-30 13:08:10 +00:00
Tatsuhiro Tsujikawa 9a922f8b02 2010-03-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Drop connection if same Peer ID has been already seen.
	* src/DefaultBtInteractive.cc
2010-03-30 13:05:53 +00:00
Tatsuhiro Tsujikawa f9c852c475 2010-03-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that waiting download unintentionally starts when
	URIs are added to it using aria2.changeUri XML-RPC method.  This
	also fixes the bug that causes segmentation fault when adding URIs
	to waiting download, which is a regression introduced by the
	previous change made to src/XmlRpcMethodImpl.cc
	* src/XmlRpcMethodImpl.cc
2010-03-29 14:43:50 +00:00
Tatsuhiro Tsujikawa feedb92ed7 2010-03-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error with g++-4.4 on FreeBSD.
	* src/util.h
2010-03-29 14:39:09 +00:00
Tatsuhiro Tsujikawa d88f7cd0a4 2010-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that added URI using aria2.changeUri XML-RPC method
	is not used immediately if there is no URIs remaining before
	calling aria2.changeUri and the number of connection is less than
	the value in -s(or -C for Metalink downloads).
	* src/XmlRpcMethodImpl.cc
2010-03-28 15:02:36 +00:00
Tatsuhiro Tsujikawa 65389139c6 2010-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Documented --always-resume and --max-resume-failure-tries option
	and exit status 8 in man page. Fixed typo.
	* doc/aria2c.1.txt
	* src/OptionHandlerFactory.cc
2010-03-28 07:38:41 +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 90bc2ccffc 2010-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --remove-control-file option to -i list options.
	* doc/aria2c.1.txt
	* doc/xmlrpc/aria2rpc
	* src/download_helper.cc
2010-03-25 14:51:41 +00:00
Tatsuhiro Tsujikawa 8507b5bde4 2010-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --remove-control-file option.  This option removes control
	file(*.aria2 file) before download. Using with
	--allow-overwrite=true, download always starts from scratch. This
	will be useful for users behind proxy server which disables
	resume. For such proxy user, -C1 is also recommended for Metalink
	downloads to avoid establishing unnecessary connections.
	* doc/aria2c.1.txt
	* src/OptionHandlerFactory.cc
	* src/RequestGroup.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
2010-03-25 14:44:16 +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
Tatsuhiro Tsujikawa f15d22b619 2010-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added vbegin() and vend() for fixed sized array.
	* src/DownloadHandlerConstants.cc
	* src/FeatureConfig.cc
	* src/OptionHandlerFactory.cc
	* src/ServerStat.cc
	* src/TimeA2.cc
	* src/XmlRpcMethod.cc
	* src/array_fun.h
	* src/download_helper.cc
	* src/messageDigest.cc
	* src/util.cc
	* test/BittorrentHelperTest.cc
	* test/DHTRoutingTableDeserializerTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/DefaultBtProgressInfoFileTest.cc
	* test/DownloadContextTest.cc
	* test/DownloadHelperTest.cc
	* test/FeatureConfigTest.cc
	* test/FeedbackURISelectorTest.cc
	* test/HttpRequestTest.cc
	* test/InOrderURISelectorTest.cc
	* test/MSEHandshakeTest.cc
	* test/MultiDiskAdaptorTest.cc
	* test/MultiFileAllocationIteratorTest.cc
	* test/PriorityPieceSelectorTest.cc
	* test/RequestGroupManTest.cc
	* test/UtilTest.cc
	* test/XmlRpcMethodTest.cc
	* test/a2algoTest.cc
	* test/array_funTest.cc
2010-03-25 13:51:10 +00:00
Tatsuhiro Tsujikawa 8477e463e9 2010-03-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Simplified code using lastByteMask
	* src/BitfieldMan.cc
	* src/PieceStatMan.cc
2010-03-24 14:25:18 +00:00
Tatsuhiro Tsujikawa 6301084ea8 2010-03-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten lastByteMask
	* src/bitfield.h
2010-03-24 14:17:08 +00:00
Tatsuhiro Tsujikawa 522ab21ebf 2010-03-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Redefined the maximum length of buffer used for HTTP header.
	* src/HttpHeaderProcessor.cc
2010-03-23 13:02:09 +00:00