Commit Graph

1076 Commits (52b17520de403a53f28f80bb07ab0131a3f58f4d)

Author SHA1 Message Date
Tatsuhiro Tsujikawa 52b17520de 2009-02-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Don't use sha256 in tests because it might not be supported by
	the SSL library.
	* test/MetalinkProcessorTest.cc
2009-02-10 14:44:33 +00:00
Tatsuhiro Tsujikawa ab06444ba7 2009-02-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed tests giving -1 for unsigned argument.
	* test/AlphaNumberDecoratorTest
	* test/BitfieldManTest.cc
	* test/DefaultBtContextTest.cc
2009-02-10 14:42:49 +00:00
Tatsuhiro Tsujikawa 01b3968f92 2009-02-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error without libcares when epoll is available.
	* src/EpollEventPoll.cc
2009-02-10 14:26:11 +00:00
Tatsuhiro Tsujikawa abae62908f 2009-02-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Included fstream instead of iostream.
	* test/SignatureTest.cc
2009-02-09 12:45:07 +00:00
Tatsuhiro Tsujikawa 28d9af6d04 2009-02-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed #include <algorithm>
	* test/RequestGroupTest.cc
2009-02-08 14:21:20 +00:00
Tatsuhiro Tsujikawa 9bb57720cf 2009-02-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten AdaptiveURISelector::mayRetryWithIncreasedTimeout()
	using RequestGroup::extractURIResult().
	* src/AdaptiveURISelector.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* test/RequestGroupTest.cc
2009-02-08 14:17:55 +00:00
Tatsuhiro Tsujikawa b8d177dd5d 2009-02-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added tests for array_ptr.
	* test/array_funTest.cc
2009-02-08 11:27:22 +00:00
Tatsuhiro Tsujikawa 9a7eee5cfa 2009-02-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Don't send ip parameter to a tracker if ip parameter is empty
	string.	
	* src/DefaultBtAnnounce.cc
2009-02-07 15:02:32 +00:00
Tatsuhiro Tsujikawa 064754396e 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Adjusted line feed.
	* src/version_usage.cc
2009-02-07 14:24:56 +00:00
Tatsuhiro Tsujikawa 9dd04b7aaa 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Print tags, possible values when OptionHandlerException is
	caught.
	* src/option_processing.cc
2009-02-07 14:24:11 +00:00
Tatsuhiro Tsujikawa d71f434f61 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Changed the message for FatalException.
	* src/OptionParser.cc
2009-02-07 14:22:17 +00:00
Tatsuhiro Tsujikawa 366e5f40d5 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Documented --bt-external-ip option in man page.  Updated man
	pages for --proxy-method option.
	* doc/aria2c.1.txt
2009-02-07 14:01:38 +00:00
Tatsuhiro Tsujikawa 0fcdb7eee3 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use GET method for FTP via HTTP proxy.
	* src/FtpInitiateConnectionCommand.cc
2009-02-07 13:52:41 +00:00
Tatsuhiro Tsujikawa 997a0c29d1 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Changed the default value of --proxy-method option from 'tunnel'
	to 'get'. Use 'tunnel' for HTTPS regardless of --proxy-method
	option.
	* src/AbstractCommand.cc
	* src/AbstractCommand.h
	* src/FtpInitiateConnectionCommand.cc
	* src/HttpDownloadCommand.cc
	* src/HttpInitiateConnectionCommand.cc
	* src/HttpInitiateConnectionCommand.h
	* src/OptionHandlerFactory.cc
2009-02-07 13:46:08 +00:00
Tatsuhiro Tsujikawa 1b854afe44 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Initialized _logger
	* src/SelectEventPoll.cc
2009-02-07 13:38:13 +00:00
Tatsuhiro Tsujikawa 0185a9d5a5 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Defined a copy constructor for the same type.
	* src/SharedHandle.h
2009-02-07 11:02:21 +00:00
Tatsuhiro Tsujikawa 2881dbe025 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added OptionParser::parseArg() which internally uses getopt_long
	to parse command-line options. All command-line options are now
	configured by OptionHandler. No manual editing of struct option*
	is required any more.
	* src/NameMatchOptionHandler.h
	* src/OptionHandler.h
	* src/OptionHandlerFactory.cc
	* src/OptionHandlerImpl.h
	* src/OptionParser.cc
	* src/OptionParser.h
	* src/array_fun.h
	* src/main.cc
	* src/option_processing.cc
	* test/OptionHandlerTest.cc
	* test/OptionParserTest.cc
2009-02-07 11:00:34 +00:00
Tatsuhiro Tsujikawa bbb3589293 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed configure error with --disable-epoll
	* configure.ac
2009-02-06 16:51:00 +00:00
Tatsuhiro Tsujikawa 5f0f8e68b2 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error when HAVE_EPOLL is not defined.
	Fixed linker error on bigendian systems.
	* src/SocketCore.cc
	* src/SocketCore.h
	* test/DefaultBtProgressInfoFileTest.cc
2009-02-06 16:49:24 +00:00
Tatsuhiro Tsujikawa 0640ea6254 2009-02-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --bt-external-ip option. You can specify the external IP
	address to report to a BitTorrent tracker. Although this
	function is named 'external', it can accept any kind of IP
	addresses.
	* src/DefaultBtAnnounce.cc
	* src/OptionHandlerFactory.cc
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/DefaultBtAnnounceTest.cc
2009-02-04 14:11:30 +00:00
Tatsuhiro Tsujikawa 23a6eff88e 2009-02-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Extracted the algorithm to find the longest incremental sequence
	as max_sequence template.
	* src/LongestSequencePieceSelector.cc
	* src/a2algo.h
	* test/Makefile.am
	* test/a2algoTest.cc
2009-02-03 14:46:33 +00:00
Tatsuhiro Tsujikawa c41fec3a22 2009-02-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed TEXT_HTTP_SERVER_LISTEN_PORT from translation texts.
	* src/usage_text.h
2009-02-02 15:25:45 +00:00
Tatsuhiro Tsujikawa d4704a9d47 2009-02-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated doc for --uri-selector, --http-server-listen-port and
	--enable-http-server option. Documented --event-poll option.	
	* doc/aria2c.1.txt
2009-02-02 14:30:29 +00:00
Tatsuhiro Tsujikawa 746c00d400 2009-02-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated doc for --enable-http-server.
	* src/usage_text.h
2009-02-02 14:20:41 +00:00
Tatsuhiro Tsujikawa a2fcc3f037 2009-02-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Documented --http-server-listen-port and --enable-http-server in
	man page.
	* doc/aria2c.1.txt
2009-02-02 14:18:02 +00:00
Tatsuhiro Tsujikawa 14d3ef79ed 2009-02-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated Spanish, Indonesian, Russian, Ukrainian and Italian
	translations. Thanks to all translators.
	* po/es.po
	* po/id.po
	* po/it.po
	* po/ru.po
	* po/uk.po
2009-02-01 04:09:44 +00:00
Tatsuhiro Tsujikawa 970b887fbc 2009-02-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.2.0
	* configure.ac
2009-02-01 03:56:40 +00:00
Tatsuhiro Tsujikawa 388b64df04 2009-02-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
BtContext::getAnnounceTiers() now returns const reference.
	* src/BtContext.h
	* src/DefaultBtContext.cc
	* src/DefaultBtContext.h
	* test/MockBtContext.h
2009-02-01 03:29:04 +00:00
Tatsuhiro Tsujikawa 746c187ae8 2009-02-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Change the number of retries for tracker request based on the
	number of available tracker in a torrent file.
	* src/TrackerWatcherCommand.cc
2009-02-01 03:24:02 +00:00
Tatsuhiro Tsujikawa 1b26827851 2009-02-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added _maxTries property to RequestGroup and assign the option
	value of PREF_MAX_TRIES to it. AbstractCommand now looks up
	RequestGroup::getMaxTries() instead of
	Option::getAsInt(PREF_MAX_TRIES).
	* src/AbstractCommand.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
2009-02-01 03:03:17 +00:00
Tatsuhiro Tsujikawa f16fb1c890 2009-02-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Applied AdaptiveURISelector-timeout patch from Pascal Rigaux at
	Mandriva. I modified the patch: make RequestGroup have the
	timeout value and AdaptiveURISelector directly modifies that
	value.
	* src/AbstractCommand.cc
	* src/AdaptiveURISelector.cc
	* src/AdaptiveURISelector.h
	* src/FtpNegotiationCommand.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
2009-02-01 02:55:44 +00:00
Tatsuhiro Tsujikawa 30e183ef54 2009-02-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compiler warning
	* test/IteratableChecksumValidatorTest.cc
2009-02-01 02:50:38 +00:00
Tatsuhiro Tsujikawa 660c480cca 2009-01-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use LongestSequencePieceSelector for HTTP/FTP/BitTorrent
	integrated downloads. This PieceSelector subclass finds the
	longest continuous sequence in the available missing pieces and
	selects the last index of such sequence. This makes HTTP/FTP
	connections less interrupted by the pieces obtained by
	BitTorrent peers.
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/LongestSequencePieceSelector.cc
	* src/LongestSequencePieceSelector.h
	* src/Makefile.am
	* src/PieceSelector.h
	* src/RarestPieceSelector.h
	* src/RequestGroup.cc
	* test/BtDependencyTest.cc
	* test/DefaultPieceStorageTest.cc
	* test/IteratableChecksumValidatorTest.cc
	* test/LongestSequencePieceSelectorTest.cc
	* test/Makefile.am
	* test/SegmentManTest.cc
2009-01-31 14:34:29 +00:00
Tatsuhiro Tsujikawa 84f02e7dd0 2009-01-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that the average speed is wrong in
	http/ftp/BitTorrent integrated download. Only the download bytes
	in BitTorrent were considered.
	* src/RequestGroup.cc
2009-01-31 13:01:25 +00:00
Tatsuhiro Tsujikawa dbc8f687c1 2009-01-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Choose port for BitTorrent/DHT randomly from the specified
	range.
	* src/DHTConnectionImpl.cc
	* src/PeerListenCommand.cc
2009-01-30 16:24:35 +00:00
Tatsuhiro Tsujikawa e5c4b24454 2009-01-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Send HTTP Authorization header only if it is requested by the
	server(response 401). There are some exceptions. The
	authorization header for proxy is always sent if it is available	
	without request	by the server.  If username/password is specified
	 in the URI, it is immediately sent to the server without
	request by the server.
	
	AbstractAuthResolver::_defaultAuthConfig is now initialized as
	SharedHandle<AuthConfig>().
	NetrcAuthResolver::resolveAuthConfig() returns
	SharedHandle<AuthConfig>() if no AuthConfig is available.
	* src/AbstractAuthResolver.cc
	* src/AbstractProxyRequestCommand.cc
	* src/AuthConfigFactory.cc
	* src/AuthConfigFactory.h
	* src/HttpConnection.cc
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpResponse.cc
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* test/AuthConfigFactoryTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
2009-01-30 16:12:41 +00:00
Tatsuhiro Tsujikawa 120ea4c609 2009-01-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Remove leading "--" from help keyword and a substring after "="
	from help keyword, so that one can query options by '-h--max-'
	or '-hmax-peers=10'.	
	* src/option_processing.cc
2009-01-27 12:40:44 +00:00
Tatsuhiro Tsujikawa 873231fe1e 2009-01-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten PStringVisitor and its implementation.
	* src/PStringBuildVisitor.cc
	* src/PStringBuildVisitor.h
	* src/PStringDatum.h
	* src/PStringNumLoop.h
	* src/PStringSegment.cc
	* src/PStringSegment.h
	* src/PStringSelect.h
	* src/PStringVisitor.h
	* src/download_helper.cc
	* test/PStringBuildVisitorTest.cc
	* test/ParameterizedStringParserTest.cc
2009-01-25 14:19:27 +00:00
Tatsuhiro Tsujikawa 5def96906f 2009-01-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Persist connection between the built-in HTTP server and a client
	if a client supports keep-alive. Fixed the bug that aria2 exits
	when the HTTP server receives EOF from a client.	
	* src/HttpServer.cc
	* src/HttpServer.h
	* src/HttpServerCommand.cc
	* src/HttpServerCommand.h
	* src/HttpServerResponseCommand.cc
2009-01-25 10:55:27 +00:00
Tatsuhiro Tsujikawa 0742e3921f 2009-01-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added experimental built-in HTTP server. Currently, when a
	client accesses to the server, it responds with the current
	download progress. By default, it is disabled. To enable the
	server, give --enable-http-server option.  To change the default
	port number for the server to listen to, use
	--http-server-listen-port option.
	The response HTML is very simple and refreshes it self each 1
	second.  Because of this refresh, you see flicker in normal web
	browser such as Firefox.  I recommend to use console-based
	browser such as elinks, w3m.  To connect to the server, run
	'elinks http://localhost:6800/' while running aria2. Please
	replace port number '6800'(which is default) with your
	preference.	
	* src/DownloadEngineFactory.cc
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/HttpHeaderProcessor.cc
	* src/HttpHeaderProcessor.h
	* src/HttpListenCommand.cc
	* src/HttpListenCommand.h
	* src/HttpServer.cc
	* src/HttpServer.h
	* src/HttpServerCommand.cc
	* src/HttpServerCommand.h
	* src/HttpServerResponseCommand.cc
	* src/HttpServerResponseCommand.h
	* src/Makefile.am
	* src/OptionHandlerFactory.cc
	* src/Util.cc
	* src/Util.h
	* src/help_tags.h
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/HttpHeaderProcessorTest.cc
	* test/UtilTest.cc
2009-01-25 09:58:40 +00:00
Tatsuhiro Tsujikawa 9505df51ef 2009-01-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed.
	* src/CheckIntegrityMan.cc
	* src/FileAllocationMan.cc
2009-01-24 10:54:52 +00:00
Tatsuhiro Tsujikawa adf91f656b 2009-01-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made (piece) hash check sequential for each RequestGroup because
	simultaneous hash check is slower than sequential execution.	
	* src/CheckIntegrityCommand.cc
	* src/CheckIntegrityDispatcherCommand.cc
	* src/CheckIntegrityDispatcherCommand.h
	* src/CheckIntegrityMan.h
	* src/ConsoleStatCalc.cc
	* src/DownloadCommand.cc
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/DownloadEngineFactory.cc
	* src/Makefile.am
	* src/Makefile.in
	* src/RequestGroup.cc
	* src/StatCalc.h
2009-01-24 10:40:42 +00:00
Tatsuhiro Tsujikawa 5da58fe01d 2009-01-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Moved setStatusRealtime() from FileAllocationDispatcherCommand
	to SequentialDispatcherCommand.
	* src/FileAllocationDispatcherCommand.cc
	* src/SequentialDispatcherCommand.h
2009-01-24 10:29:36 +00:00
Tatsuhiro Tsujikawa a20aa3c7e5 2009-01-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten FileAllocationDispatcherCommand using brand new
	SequentialDispatcherCommand.
	* src/DownloadEngineFactory.cc
	* src/FileAllocationCommand.cc
	* src/FileAllocationDispatcherCommand.cc
	* src/FileAllocationDispatcherCommand.h
	* src/Makefile.am
	* src/SequentialDispatcherCommand.h
2009-01-24 09:49:37 +00:00
Tatsuhiro Tsujikawa 8ca9db9f3e 2009-01-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced FileAllocationMan with
	SequentialPicker<FileAllocationEntry>.
	* src/BtCheckIntegrityEntry.cc
	* src/ConsoleStatCalc.cc
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/DownloadEngineFactory.cc
	* src/FileAllocationCommand.cc
	* src/FileAllocationDispatcherCommand.cc
	* src/FileAllocationMan.h
	* src/Makefile.am
	* src/SequentialPicker.h
	* src/StatCalc.h
	* src/StreamCheckIntegrityEntry.cc
	* test/Makefile.am
	* test/SequentialPickerTest.cc
2009-01-24 09:00:36 +00:00
Tatsuhiro Tsujikawa ea370b864e 2009-01-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added doc for adaptive URI selector.
	* doc/aria2c.1.txt
2009-01-19 14:14:26 +00:00
Tatsuhiro Tsujikawa ddd050f65f 2009-01-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added doc for adaptive URI selector.
	* src/usage_text.h
2009-01-19 14:11:04 +00:00
Tatsuhiro Tsujikawa 526e1677d9 2009-01-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added doc for --bt-max-peers option.
	* doc/aria2c.1.txt
2009-01-19 13:59:29 +00:00
Tatsuhiro Tsujikawa 8bd9ca287d 2009-01-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added doc for --bt-hash-check-seed option.
	* doc/aria2c.1.txt
2009-01-19 13:56:19 +00:00
Tatsuhiro Tsujikawa c38a2491a6 2009-01-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Documented exit codes.
	* doc/aria2c.1.txt
2009-01-19 13:46:39 +00:00