Commit Graph

2583 Commits (1875d7382ff41ce19a3ef93bb3703c3467b9692b)

Author SHA1 Message Date
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 983b6006fd 2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Append 'u' to hex mask.
	* src/Base64.cc
	* src/BitfieldMan.cc
	* src/BtHandshakeMessage.cc
	* src/BtHandshakeMessage.h
	* src/DHTBucket.cc
	* src/DHTRoutingTableDeserializer.cc
	* src/DHTRoutingTableSerializer.cc
	* src/DefaultBtProgressInfoFile.cc
	* src/MSEHandshake.h
	* src/MultiUrlRequestInfo.cc
	* src/Platform.cc
	* src/SpeedCalc.cc
	* src/UTPexExtensionMessage.cc
	* src/a2netcompat.h
	* src/base32.cc
	* src/bitfield.h
	* src/bittorrent_helper.cc
	* src/cookie_helper.cc
	* src/util.h
2010-10-10 03:08:30 +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 b8f8a14937 2010-10-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Don't append slash in CookieStorage::criteriaFind().  Append file
	part of URI to request-uri in HttpRequest::createRequest().  This
	change reverts the part of the previous change:"The
	request-path must be ends with '/' so that request-path '/foo/'
	path-matches cookie-path '/foo' and '/foo/' in the proposed
	algorithm."
	* src/CookieStorage.cc
	* src/HttpRequest.cc
2010-10-09 14:38:47 +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 329de2a9b5 2010-10-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Reverted the previous change in src/MultiUrlRequestInfo.cc.
	Change log level of warning message about CA certificates to info.
	* src/MultiUrlRequestInfo.cc
2010-10-03 14:13:03 +00:00
Tatsuhiro Tsujikawa be2cd51e1b 2010-10-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed warning message when CA certificates are not imported.
	--ca-certificate and --check-certificate option were added to the
	error message displayed when certificate verification failed.
	* src/MultiUrlRequestInfo.cc
	* src/message.h
2010-10-03 14:07:57 +00:00
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