Commit Graph

93 Commits (72369c20c6e90fe327fdc6a64689626c20e1477b)

Author SHA1 Message Date
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 7c317de4e7 Added Metalink/HTTP Link and Digest header field parser. 2011-07-26 23:41:21 +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 871819af59 Added util::joinUri() 2011-04-30 00:15:27 +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 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 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 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 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 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 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 4951142346 2010-03-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Accept IPv4 network address with CIDR block in --no-proxy option
	and no_proxy environment variable.  Current implementation does
	not resolve hostname in URI to compare network address. So it is
	only effecive if URI has numeric IP addresses.
	* doc/aria2c.1.txt
	* src/AbstractCommand.cc
	* src/OptionHandlerFactory.cc
	* src/bitfield.h
	* src/usage_text.h
	* src/util.cc
	* src/util.h
	* test/UtilTest.cc
	* test/bitfieldTest.cc
2010-03-19 08:56:17 +00:00
Tatsuhiro Tsujikawa 3ecf6e4b6f 2010-03-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Ignore filename parameter if it contains directory traversal
	directives.
	* src/util.cc
	* test/UtilTest.cc
2010-03-07 15:06:48 +00:00
Tatsuhiro Tsujikawa 41b7b9428f 2010-03-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
urldecode -> percentDecode
	* src/FtpConnection.cc
	* src/FtpNegotiationCommand.cc
	* src/HttpResponse.cc
	* src/Request.cc
	* src/magnet.cc
	* src/util.cc
	* src/util.h
	* test/UtilTest.cc
2010-03-07 14:29:40 +00:00
Tatsuhiro Tsujikawa 10b52bd9ac 2010-03-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
urlencode -> percentEncode,
	torrentUrlencode -> torrentPercentEncode
	* src/BtHandshakeMessage.cc
	* src/BtHandshakeMessageValidator.h
	* src/DHTMessageFactoryImpl.cc
	* src/DefaultBtAnnounce.cc
	* src/HandshakeExtensionMessage.cc
	* src/HttpRequest.cc
	* src/XmlRpcMethodImpl.cc
	* src/bittorrent_helper.cc
	* src/util.cc
	* src/util.h
	* test/DHTAnnouncePeerMessageTest.cc
	* test/DHTGetPeersMessageTest.cc
	* test/DHTGetPeersReplyMessageTest.cc
	* test/UTPexExtensionMessageTest.cc
	* test/UtilTest.cc
2010-03-07 14:24:21 +00:00
Tatsuhiro Tsujikawa 7637fd76a2 2010-03-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that util::itos(INT64_MIN) fails.
	* src/util.cc
	* src/util.h
	* test/UtilTest.cc
2010-03-05 14:38:49 +00:00
Tatsuhiro Tsujikawa e8d091af18 2010-02-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced null or control characters in file path with '_'.  For
	MinGW32 build, additional characters which is not allowed in
	Windows kernel are also replaced. util::detectDirTraversal() now
	returns true if given string contains null or control characters.
	* src/DownloadContext.cc
	* src/DownloadContext.h
	* src/Metalink2RequestGroup.cc
	* src/MetalinkParserController.cc
	* src/bittorrent_helper.cc
	* src/util.cc
	* src/util.h
	* test/UtilTest.cc
2010-02-27 10:06:40 +00:00
Tatsuhiro Tsujikawa 3880a5f71b 2010-02-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added Metalink4 support. Currently, name attribute of
	metalink::metaurl is ignored and multi-file torrent cannot be used
	with Metalink4.
	* doc/aria2c.1.txt
	* src/DownloadHandlerConstants.cc
	* src/ExpatMetalinkProcessor.cc
	* src/Makefile.am
	* src/Metalink2RequestGroup.cc
	* src/MetalinkEntry.cc
	* src/MetalinkEntry.h
	* src/MetalinkParserController.cc
	* src/MetalinkParserController.h
	* src/MetalinkParserState.h
	* src/MetalinkParserStateImpl.cc
	* src/MetalinkParserStateImpl.h
	* src/MetalinkParserStateMachine.cc
	* src/MetalinkParserStateMachine.h
	* src/MetalinkParserStateV3Impl.cc
	* src/MetalinkParserStateV3Impl.h
	* src/MetalinkParserStateV4Impl.cc
	* src/MetalinkParserStateV4Impl.h
	* src/MetalinkResource.cc
	* src/MetalinkResource.h
	* src/Metalinker.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/XML2SAXMetalinkProcessor.cc
	* src/messageDigest.cc
	* src/util.cc
	* src/util.h
	* test/Makefile.am
	* test/MetalinkEntryTest.cc
	* test/MetalinkParserControllerTest.cc
	* test/MetalinkProcessorTest.cc
	* test/MetalinkerTest.cc
	* test/UtilTest.cc
	* test/metalink4-attrs.xml
	* test/metalink4-dirtraversal.xml
	* test/metalink4.xml
2010-02-25 14:40:18 +00:00
Tatsuhiro Tsujikawa 780aaf9c80 2010-02-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added unit tests for util::getContentDispositionFilename() from
	http://greenbytes.de/tech/tc2231/ Fixed the function so that added
	tests are passed.
	* src/util.cc
	* test/UtilTest.cc
2010-02-19 10:54:40 +00:00
Tatsuhiro Tsujikawa 2da32876a2 2010-02-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Support RFC2231 "Parameter Value Character Set and Language
	Information" in Content-Disposition header.
	* src/HttpResponse.cc
	* src/util.cc
	* src/util.h
	* test/UtilTest.cc
2010-02-17 16:09:19 +00:00
Tatsuhiro Tsujikawa eb4116ae57 2010-01-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced isNumberAndDotsNotation() with isNumericHost().
	isNumericHost() can handle IPv6 address.
	* src/Cookie.cc
	* src/CookieStorage.cc
	* src/util.cc
	* src/util.h
	* test/CookieTest.cc
	* test/UtilTest.cc
2010-01-28 14:25:16 +00:00
Tatsuhiro Tsujikawa 768f78f771 2010-01-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced '/' and '_' with '_' in HTTP/FTP filename.
	* src/A2STR.cc
	* src/A2STR.h
	* src/FtpNegotiationCommand.cc
	* src/HttpResponseCommand.cc
	* src/util.cc
	* src/util.h
	* test/UtilTest.cc
2010-01-11 14:32:20 +00:00
Tatsuhiro Tsujikawa 4c89170488 2010-01-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Treat --dir="" as --dir="."
	* src/FtpNegotiationCommand.cc
	* src/HttpResponseCommand.cc
	* src/Metalink2RequestGroup.cc
	* src/UTMetadataPostDownloadHandler.cc
	* src/bittorrent_helper.cc
	* src/download_helper.cc
	* src/util.cc
	* src/util.h
	* test/UtilTest.cc
2010-01-11 14:01:20 +00:00
Tatsuhiro Tsujikawa 4db349c1f3 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80
	columns.
	* src
	* test
2010-01-05 16:01:46 +00:00
Tatsuhiro Tsujikawa 58bb1fa266 2009-12-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Specified defaultSize as an argument for easy testing.
	* src/util.cc
	* src/util.h
	* test/UtilTest.cc
2009-12-07 12:49:19 +00:00
Tatsuhiro Tsujikawa a41b927a57 2009-12-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Set default value for SIZE in --bt-prioritize-piece to 1MiB.
	* src/usage_text.h
	* src/util.cc
	* test/UtilTest.cc
2009-12-06 11:35:45 +00:00
Tatsuhiro Tsujikawa e208302947 2009-11-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added option --bt-prioritize-piece.  This option instruct aria2 to
	try to download first and last pieces of each file first. The
	argument can contain 2 keywords:head and tail. To include both
	keywords, they must be separated by comma. These keywords can take
	one parameter, SIZE. For example , if head=SIZE is specified,
	pieces in the range of first SIZE bytes of each file get higher
	priority. tail=SIZE means the range of last SIZE bytes of each
	file. SIZE can include K or M(1K = 1024, 1M = 1024K).
	* src/DefaultPieceStorage.h
	* src/Makefile.am
	* src/OptionHandlerFactory.cc
	* src/OptionHandlerImpl.h
	* src/PriorityPieceSelector.cc
	* src/PriorityPieceSelector.h
	* src/RequestGroup.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* src/util.cc
	* src/util.h
	* test/Makefile.am
	* test/MockPieceSelector.h
	* test/PriorityPieceSelectorTest.cc
	* test/UtilTest.cc
2009-11-29 06:43:38 +00:00
Tatsuhiro Tsujikawa e0d9798b94 2009-11-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added FromHex()
	* src/util.cc
	* src/util.h
	* test/UtilTest.cc
2009-11-22 14:30:51 +00:00
Tatsuhiro Tsujikawa e976b23728 2009-10-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed Util.{cc,h} as util.{cc,h}
	* src/Util.cc
	* src/Util.h
	* src/util.cc
	* src/util.h
2009-10-22 15:35:33 +00:00
Tatsuhiro Tsujikawa c6035b2e24 2009-10-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Moved static functions in Util class to namespace util.
	* src
	* test
2009-10-22 15:09:00 +00:00
Tatsuhiro Tsujikawa 3349fe0811 2009-10-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Moved generateRandomData to Util.cc Moved flipBit to bitfield.cc.
	Moved generateRandomKey to bittorrent_helper.cc.
	* src/DHTBucket.cc
	* src/DHTGetPeersMessage.cc
	* src/DHTGetPeersReplyMessage.cc
	* src/DHTMessage.cc
	* src/DHTNode.cc
	* src/DHTTokenTracker.cc
	* src/DHTUtil.cc: Removed.
	* src/DHTUtil.h: Removed.
	* src/Makefile.am
	* src/Util.cc
	* src/Util.h
	* src/bitfield.h
	* src/bittorrent_helper.cc
	* src/bittorrent_helper.h
	* test/ARC4Test.cc
	* test/BNodeTest.cc
	* test/DHTAnnouncePeerMessageTest.cc
	* test/DHTAnnouncePeerReplyMessageTest.cc
	* test/DHTFindNodeMessageTest.cc
	* test/DHTFindNodeReplyMessageTest.cc
	* test/DHTGetPeersMessageTest.cc
	* test/DHTGetPeersReplyMessageTest.cc
	* test/DHTPingMessageTest.cc
	* test/DHTPingReplyMessageTest.cc
	* test/DHTTokenTrackerTest.cc
	* test/DHTUtilTest.cc: Removed.
	* test/Makefile.am
	* test/UtilTest.cc
2009-10-22 14:43:42 +00:00
Tatsuhiro Tsujikawa c8d34a46be 2009-10-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced Util::slice() with split()
	* src/AbstractCommand.cc
	* src/CookieParser.cc
	* src/File.cc
	* src/HttpHeaderProcessor.cc
	* src/HttpRequest.cc
	* src/Metalink2RequestGroup.cc
	* src/MetalinkParserController.cc
	* src/Netrc.cc
	* src/NsCookieParser.cc
	* src/ParameterizedStringParser.cc
	* src/ServerStatMan.cc
	* src/UriListParser.cc
	* src/Util.cc
	* src/Util.h
	* src/bittorrent_helper.cc
	* test/UtilTest.cc
2009-10-18 12:31:07 +00:00
Tatsuhiro Tsujikawa 909b126180 2009-09-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed unused methods Util::fileCopy(), Util::rangedFileCopy(),
	Util::expandBuffer(), Util::unfoldRange(), Util::indexRange() and
	Util::httpGMT().
	* src/Util.cc
	* src/Util.h
	* test/UtilTest.cc
2009-09-23 06:47:56 +00:00
Tatsuhiro Tsujikawa 376e39a1f4 2009-08-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Show exact file size along in -S option output.
	* src/Util.h
	* src/bittorrent_helper.cc
	* test/UtilTest.cc
2009-08-18 14:36:52 +00:00
Tatsuhiro Tsujikawa 5699b67526 2009-06-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten DownloadContext and removed SingleFileDownloadContext
	and BtContext and its derived classes. BitTorrent specific
	attributes are now set by DownloadContext::setAttribute() with key
	bittorrent::BITTORRENT.
	* src/AbstractBtMessage.cc
	* src/AbstractBtMessage.h
	* src/AbstractCommand.cc
	* src/AbstractCommand.h
	* src/AbstractProxyRequestCommand.cc
	* src/AbstractProxyResponseCommand.cc
	* src/ActivePeerConnectionCommand.cc
	* src/ActivePeerConnectionCommand.h
	* src/AnnounceList.cc
	* src/BtCheckIntegrityEntry.cc
	* src/BtConstants.h
	* src/BtContext.h: Removed
	* src/BtDependency.cc
	* src/BtExtendedMessage.cc
	* src/BtPieceMessage.cc
	* src/BtPieceMessage.h
	* src/BtPostDownloadHandler.cc
	* src/BtRegistry.cc
	* src/BtRegistry.h
	* src/BtSetup.cc
	* src/CheckIntegrityCommand.cc
	* src/CheckIntegrityEntry.cc
	* src/ChecksumCheckIntegrityEntry.cc
	* src/ConsoleStatCalc.cc
	* src/ContentTypeRequestGroupCriteria.cc
	* src/DHTGetPeersCommand.cc
	* src/DHTGetPeersCommand.h
	* src/DHTPeerLookupTask.cc
	* src/DHTPeerLookupTask.h
	* src/DHTTaskFactory.h
	* src/DHTTaskFactoryImpl.cc
	* src/DHTTaskFactoryImpl.h
	* src/DefaultBtAnnounce.cc
	* src/DefaultBtAnnounce.h
	* src/DefaultBtContext.cc: Removed
	* src/DefaultBtContext.h: Removed
	* src/DefaultBtInteractive.cc
	* src/DefaultBtInteractive.h
	* src/DefaultBtMessageDispatcher.cc
	* src/DefaultBtMessageDispatcher.h
	* src/DefaultBtMessageFactory.cc
	* src/DefaultBtMessageFactory.h
	* src/DefaultBtMessageReceiver.cc
	* src/DefaultBtMessageReceiver.h
	* src/DefaultBtProgressInfoFile.cc
	* src/DefaultBtRequestFactory.cc
	* src/DefaultBtRequestFactory.h
	* src/DefaultExtensionMessageFactory.cc
	* src/DefaultExtensionMessageFactory.h
	* src/DefaultPeerStorage.cc
	* src/DefaultPeerStorage.h
	* src/DefaultPieceStorage.cc
	* src/DefaultSegmentManFactory.cc
	* src/DiskAdaptor.cc
	* src/DiskAdaptor.h
	* src/DownloadContext.cc
	* src/DownloadContext.h
	* src/DownloadEngine.cc
	* src/DownloadEngineFactory.cc
	* src/DownloadHandler.cc
	* src/DownloadResult.h
	* src/FileAllocationCommand.cc
	* src/FileAllocationDispatcherCommand.cc
	* src/FileAllocationEntry.cc
	* src/FileEntry.h
	* src/FillRequestGroupCommand.cc
	* src/FtpDownloadCommand.cc
	* src/FtpFinishDownloadCommand.cc
	* src/FtpInitiateConnectionCommand.cc
	* src/FtpNegotiationCommand.cc
	* src/FtpTunnelRequestCommand.cc
	* src/FtpTunnelResponseCommand.cc
	* src/HandshakeExtensionMessage.cc
	* src/HandshakeExtensionMessage.h
	* src/HaveEraseCommand.cc
	* src/HttpDownloadCommand.cc
	* src/HttpInitiateConnectionCommand.cc
	* src/HttpProxyRequestCommand.cc
	* src/HttpProxyResponseCommand.cc
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/HttpResponseCommand.cc
	* src/HttpServerBodyCommand.cc
	* src/HttpServerCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/InitiateConnectionCommandFactory.cc
	* src/InitiatorMSEHandshakeCommand.cc
	* src/InitiatorMSEHandshakeCommand.h
	* src/IteratableChecksumValidator.cc
	* src/IteratableChecksumValidator.h
	* src/IteratableChunkChecksumValidator.cc
	* src/MSEHandshake.cc
	* src/MSEHandshake.h
	* src/Makefile.am
	* src/Makefile.in
	* src/Metalink2RequestGroup.cc
	* src/MetalinkPostDownloadHandler.cc
	* src/MultiDiskAdaptor.cc
	* src/MultiDiskAdaptor.h
	* src/MultiFileAllocationIterator.cc
	* src/MultiUrlRequestInfo.cc
	* src/PeerChokeCommand.cc
	* src/PeerChokeCommand.h
	* src/PeerInitiateConnectionCommand.cc
	* src/PeerInitiateConnectionCommand.h
	* src/PeerInteractionCommand.cc
	* src/PeerInteractionCommand.h
	* src/PeerReceiveHandshakeCommand.cc
	* src/PieceHashCheckIntegrityEntry.cc
	* src/RealtimeCommand.cc
	* src/ReceiverMSEHandshakeCommand.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/RequestGroupEntry.cc
	* src/RequestGroupMan.cc
	* src/SeedCheckCommand.cc
	* src/SeedCheckCommand.h
	* src/SegmentMan.cc
	* src/ShareRatioSeedCriteria.h
	* src/SingleFileDownloadContext.cc: Removed
	* src/SingleFileDownloadContext.h: Removed
	* src/SleepCommand.cc
	* src/StreamCheckIntegrityEntry.cc
	* src/TrackerWatcherCommand.cc
	* src/TrackerWatcherCommand.h
	* src/UnknownLengthPieceStorage.cc
	* src/Util.cc
	* src/Util.h
	* src/XmlRpcMethodImpl.cc
	* src/bittorrent_helper.cc
	* src/bittorrent_helper.h
	* src/download_helper.cc
	* src/main.cc
	* src/option_processing.cc
	* test/BitfieldManTest.cc
	* test/BittorrentHelperTest.cc
	* test/BtCancelMessageTest.cc
	* test/BtChokeMessageTest.cc
	* test/BtDependencyTest.cc
	* test/BtPieceMessageTest.cc
	* test/BtPostDownloadHandlerTest.cc
	* test/BtRegistryTest.cc
	* test/BtRejectMessageTest.cc
	* test/BtRequestMessageTest.cc
	* test/DHTPeerAnnounceStorageTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/DefaultBtContextTest.cc: Removed
	* test/DefaultBtMessageDispatcherTest.cc
	* test/DefaultBtMessageFactoryTest.cc
	* test/DefaultBtProgressInfoFileTest.cc
	* test/DefaultBtRequestFactoryTest.cc
	* test/DefaultExtensionMessageFactoryTest.cc
	* test/DefaultPeerStorageTest.cc
	* test/DefaultPieceStorageTest.cc
	* test/DirectDiskAdaptorTest.cc
	* test/DownloadContextTest.cc
	* test/DownloadHandlerFactoryTest.cc
	* test/DownloadHelperTest.cc
	* test/HandshakeExtensionMessageTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/IteratableChecksumValidatorTest.cc
	* test/IteratableChunkChecksumValidatorTest.cc
	* test/MSEHandshakeTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/Metalink2RequestGroupTest.cc
	* test/MetalinkPostDownloadHandlerTest.cc
	* test/MockBtContext.h: Removed
	* test/MockDHTTaskFactory.h
	* test/MockDownloadContext.h: Removed
	* test/MockPieceStorage.h
	* test/MultiDiskAdaptorTest.cc
	* test/MultiFileAllocationIteratorTest.cc
	* test/RequestGroupManTest.cc
	* test/RequestGroupTest.cc
	* test/SegmentManTest.cc
	* test/ShareRatioSeedCriteriaTest.cc
	* test/SingleFileDownloadContextTest.cc: Removed
	* test/UtilTest.cc
	* test/XmlRpcMethodTest.cc
2009-06-28 10:37:15 +00:00
Tatsuhiro Tsujikawa c1aef8e2d1 2009-05-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Now the constructor of AbstractDiskWriter takes filename as an
	argument and filename argument is removed from openFile(),
	initAndOpenFile(), openExistingFile() interface.  storeDir
	member and its accessor functions are removed from DiskAdaptor
	because it is not used anymore.  size() member function of
	DefaultDiskWriter, DirectDiskAdaptor and MultiDiskAdaptor now
	can be called without opening file.
	* src/AbstractDiskWriter.cc
	* src/AbstractDiskWriter.h
	* src/AbstractSingleDiskAdaptor.cc
	* src/AbstractSingleDiskAdaptor.h
	* src/ByteArrayDiskWriter.cc
	* src/ByteArrayDiskWriter.h
	* src/ByteArrayDiskWriterFactory.cc
	* src/ByteArrayDiskWriterFactory.h
	* src/DefaultDiskWriter.cc
	* src/DefaultDiskWriter.h
	* src/DefaultDiskWriterFactory.cc
	* src/DefaultDiskWriterFactory.h
	* src/DefaultPieceStorage.cc
	* src/DirectDiskAdaptor.cc
	* src/DirectDiskAdaptor.h
	* src/DiskAdaptor.h
	* src/DiskWriter.h
	* src/DiskWriterFactory.h
	* src/MessageDigestHelper.cc
	* src/MultiDiskAdaptor.cc
	* src/RequestGroup.cc
	* src/UnknownLengthPieceStorage.cc
	* src/Util.cc
	* test/DefaultDiskWriterTest.cc
	* test/DirectDiskAdaptorTest.cc
	* test/FallocFileAllocationIteratorTest.cc
	* test/MessageDigestHelperTest.cc
	* test/MetalinkProcessorTest.cc
	* test/MultiDiskAdaptorTest.cc
	* test/MultiFileAllocationIteratorTest.cc
	* test/SingleFileAllocationIteratorTest.cc
	* test/UtilTest.cc
2009-05-04 07:50:38 +00:00
Tatsuhiro Tsujikawa a6b02840fa 2009-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
BitfieldMan::getMissingIndexes family functions now takes
	unsigned char* bitfield instead of stl container for efficiency.
	PieceSelector::select now takes this
	bitfield. RarestPieceSelector::select now also performs
	efficiently for this change.  bitfield namespace is introduced
	and it has several helper functions to handle basic bitfield
	operations such as test, count set bits, etc.
	* src/BitfieldMan.cc
	* src/BitfieldMan.h
	* src/DefaultBtRequestFactory.cc
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/LongestSequencePieceSelector.cc
	* src/LongestSequencePieceSelector.h
	* src/Makefile.am
	* src/Piece.cc
	* src/Piece.h
	* src/PieceSelector.h
	* src/RarestPieceSelector.cc
	* src/RarestPieceSelector.h
	* src/Util.cc
	* src/Util.h
	* src/bitfield.h
	* test/BitfieldManTest.cc
	* test/LongestSequencePieceSelectorTest.cc
	* test/Makefile.am
	* test/RarestPieceSelectorTest.cc
	* test/UtilTest.cc
	* test/bitfieldTest.cc
2009-03-28 13:29:38 +00:00
Tatsuhiro Tsujikawa f44554a634 2009-03-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --index-out option to specify each file path for torrent.
	Here index shown in --show-files option is used to specify which
	file path should be altered. For example, to change the file
	path with index=2, use --index-out=2=aria2.tar.bz2. You can use
	this option multiple times: --index-out=1=aria2.tar.bz2
	--index-out=2=aria2-opt.tar.bz2. The short hand form -O is also
	available. This option can be specified in -i list.	
	* src/DefaultBtContext.cc
	* src/DefaultBtContext.h
	* src/MultiDiskAdaptor.cc
	* src/MultiDiskAdaptor.h
	* src/MultiFileAllocationIterator.cc
	* src/OptionHandlerFactory.cc
	* src/OptionHandlerImpl.h
	* src/Util.cc
	* src/Util.h
	* src/download_helper.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/DefaultBtContextTest.cc
	* test/MultiDiskAdaptorTest.cc
	* test/MultiFileAllocationIteratorTest.cc
	* test/UtilTest.cc
2009-03-07 03:10:53 +00:00
Tatsuhiro Tsujikawa 70a8403575 2009-03-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added Util::pathJoin()
	* src/Util.h
	* test/UtilTest.cc
2009-03-04 15:53:56 +00:00
Tatsuhiro Tsujikawa 6f0bd778ee 2009-03-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Applied basename function to remove directory element in
	content-disposition value.
	Return empty string if content-disposition value is ".." or ".".
	* src/Util.cc
	* test/UtilTest.cc
2009-03-04 14:49:10 +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 b3aa7cef1d 2008-11-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
RFC3986 complied Percent-Encoding(urlencode).
	Use uppercase hexadecimal digits for encoded text instead of
	lowercase ones.
	* src/Request.cc
	* src/Util.cc
	* src/Util.h
	* test/BtHandshakeMessageTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/DefaultBtContextTest.cc
	* test/RequestTest.cc
	* test/UtilTest.cc
2008-11-27 15:29:15 +00:00
Tatsuhiro Tsujikawa 93edc7bd20 2008-10-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compiler warning.
	* test/UtilTest.cc
2008-10-27 14:33:14 +00:00