Commit Graph

63 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa
5a223115e0 Rewrite CookieStorage 2013-06-29 23:09:09 +09:00
Tatsuhiro Tsujikawa
a4cf50914d HttpRequest: Use raw non-owning pointer for cookieStorage_ 2013-06-25 23:01:00 +09:00
Tatsuhiro Tsujikawa
4803482a51 HttpRequest: Store non-owning raw pointer for authConfigFactory_ 2013-06-25 22:06:29 +09:00
Tatsuhiro Tsujikawa
07d270c87e Require -std=c++11 and use std::shared_ptr instead of SharedHandle 2013-06-22 01:10:38 +09:00
Tatsuhiro Tsujikawa
5e4029a355 Fix unit test HttpRequestTest.cc 2013-03-18 22:47:12 +09:00
Tatsuhiro Tsujikawa
67fa274578 Add test when instance-length is 0 2013-02-21 00:42:37 +09:00
Tatsuhiro Tsujikawa
8b0c701266 Removed trailing spaces 2012-10-01 23:52:22 +09:00
Tatsuhiro Tsujikawa
e34d0e7ffa Dont' return SharedHandle from HttpHeader::getRange() 2012-09-30 17:30:35 +09:00
Tatsuhiro Tsujikawa
8b0bdacace Don't send Proxy-Connection header field
It was deprecated long ago.
2012-09-23 21:51:53 +09:00
Tatsuhiro Tsujikawa
461a542c5e Rewritten DownloadHandlerConstants
DownloadHandlerConstants was simplified.  MIME type handling in Accept
header was also reworked.  DownloadContext's metalinkServerContacted_
is replaced with acceptMetalink_ and its boolean value is reverted.
RequestGroup and HttpRequest now do not hold vector of accepting
types.  HttpRequest has the flag acceptMetalink_ which will be set by
the same value of DownloadContext::accpetMetalink_ and if it is true,
Metalink MIME types are added to Accept header field.
2012-09-22 23:19:41 +09:00
Tatsuhiro Tsujikawa
1b874268a0 Use int64_t instead of off_t
Some classes such as DiskAdaptor, DiskWriter, FileAllocationIterator
and ChecksumValidator are left unchanged.
2012-06-25 23:35:24 +09:00
Tatsuhiro Tsujikawa
4ea28cb837 Don't send basic auth header to service operated on differenct port.
When --http-auth-challenge=true, aria2 only sends basic auth header
when requested. Old implementation sends basic auth header to service
operated in different port in successive request. This change avoid
this bug.
2011-07-27 23:28:31 +09:00
Tatsuhiro Tsujikawa
7230fbd2f7 Replaced HAVE_LIBZ with HAVE_ZLIB 2011-02-18 22:34:38 +09:00
Tatsuhiro Tsujikawa
1b9329c67c Accept HTTP 304 reply as success when If-None-Match request-header
field is specified using --header option.

When --conditional-get is used, --allow-overwrite is now required to
overwrite existing file.
2011-01-29 23:19:10 +09: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
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
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
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
8274432f14 2010-07-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Set end byte in Range header if start byte > 0 to get more chance
	to pool socket.
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/DownloadCommand.cc
	* src/HttpDownloadCommand.cc
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/PieceStorage.h
	* src/UnknownLengthPieceStorage.h
	* test/DefaultPieceStorageTest.cc
	* test/HttpRequestTest.cc
	* test/MockPieceStorage.h
2010-07-12 11:55:23 +00:00
Tatsuhiro Tsujikawa
ca4940622c 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Changed naming standards for class member variable: now it looks
	like var_ instead of _var.
2010-06-21 13:51:56 +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
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
b0f180c99c 2010-03-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
url -> uri in Request class.
	* src/AbstractCommand.cc
	* src/AdaptiveURISelector.cc
	* src/DefaultBtAnnounce.cc
	* src/FeedbackURISelector.cc
	* src/FileEntry.cc
	* src/FileEntry.h
	* src/HttpRequest.h
	* src/HttpResponse.cc
	* src/InitiateConnectionCommandFactory.cc
	* src/Metalink2RequestGroup.cc
	* src/OptionHandlerImpl.h
	* src/ProtocolDetector.cc
	* src/Request.cc
	* src/Request.h
	* src/XmlRpcMethodImpl.cc
	* test/AuthConfigFactoryTest.cc
	* test/FtpConnectionTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/RequestTest.cc
2010-03-07 10:36:42 +00:00
Tatsuhiro Tsujikawa
aee471e52c 2010-02-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
User-defined custom request headers specified by --header option
	now override builtin headers if they have same name.
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* test/HttpRequestTest.cc
2010-02-20 12:55:23 +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
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
ce25b54cfe 2009-08-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added support for IPv6 literal address in URI. Now aria2 can
	handle URI such as http://[::1]/
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/Request.cc
	* src/Request.h
	* test/HttpRequestTest.cc
	* test/OptionHandlerTest.cc
	* test/RequestTest.cc
2009-08-30 15:05:30 +00:00
Tatsuhiro Tsujikawa
682bafae0a 2009-07-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use option of each download to create AuthConfig instead of global
	option.	
	* src/AuthConfigFactory.cc
	* src/AuthConfigFactory.h
	* src/FtpNegotiationCommand.cc
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/MultiUrlRequestInfo.cc
	* test/AuthConfigFactoryTest.cc
	* test/FtpConnectionTest.cc
	* test/HttpRequestTest.cc
2009-07-14 12:37:34 +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
120e2de096 2009-02-19 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --http-auth-challenge option.  If it is set to true(by
	default), aria2 sends HTTP authorization header only when it is
	requested by the server. If false is set, then authorization
	header is always sent to the server. This is useful for servers
	that don't respond 401 code when authentication is required.
	There is an exception: if username and password are embedded in
	URI, authorization header is always sent to the server
	regardless of this option.
	* src/AuthConfigFactory.cc
	* src/HttpSkipResponseCommand.cc
	* src/OptionHandlerFactory.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/AuthConfigFactoryTest.cc
	* test/HttpRequestTest.cc
2009-02-19 12:02:22 +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
62105714ef 2008-11-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use HEAD method to get file size from HTTP server for segmented
	downloading.
	The request to the BitTorrent Tracker always uses GET method
	because the response of the tracker is small and it doesn't need
	segmented download.
	* src/FtpNegotiationCommand.cc
	* src/HttpRequest.cc
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/TrackerWatcherCommand.cc
	* test/HttpRequestTest.cc
2008-11-23 15:00:44 +00:00
Tatsuhiro Tsujikawa
93a49e4840 2008-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added the ability to pool proxy connection.
	The conneciton in FTP with proxy-method=GET is not pooled.
	Proxy-Connection header will not be sent when sending CONNECT
	method.
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/FtpFinishDownloadCommand.cc
	* src/FtpInitiateConnectionCommand.cc
	* src/FtpNegotiationCommand.cc
	* src/HttpDownloadCommand.cc
	* src/HttpInitiateConnectionCommand.cc
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpResponse.cc
	* src/HttpSkipResponseCommand.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
2008-11-05 12:30:22 +00:00
Tatsuhiro Tsujikawa
c7fb678e6e 2008-11-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Deprecated --http-proxy-user and --http-proxy-passwd options.
	Added --https-proxy, --ftp-proxy and --all-proxy options.
	Above 3 options and --http-proxy option can handle proxy in URL
	format like: http://user:passwd@host:port.
	If a proxy requires user/password, they must be specified in a
	URL.
	Deprecated --ftp-via-http-proxy option. Use --http-proxy-method
	option instead.
	* src/AbstractCommand.cc
	* src/AbstractCommand.h
	* src/AbstractProxyRequestCommand.cc
	* src/AbstractProxyRequestCommand.h
	* src/AuthConfigFactory.cc
	* src/AuthConfigFactory.h
	* src/FtpFinishDownloadCommand.cc
	* src/FtpInitiateConnectionCommand.cc
	* src/FtpInitiateConnectionCommand.h
	* src/FtpNegotiationCommand.cc
	* src/FtpTunnelRequestCommand.cc
	* src/FtpTunnelRequestCommand.h
	* src/HttpDownloadCommand.cc
	* src/HttpInitiateConnectionCommand.cc
	* src/HttpInitiateConnectionCommand.h
	* src/HttpProxyRequestCommand.cc
	* src/HttpProxyRequestCommand.h
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/HttpRequestCommand.h
	* src/HttpSkipResponseCommand.cc
	* src/InitiateConnectionCommand.cc
	* src/InitiateConnectionCommand.h
	* src/OptionHandlerFactory.cc
	* src/OptionHandlerImpl.h
	* src/Request.cc
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/AuthConfigFactoryTest.cc
	* test/HttpRequestTest.cc
	* test/OptionHandlerTest.cc
2008-11-04 14:08:26 +00:00
Tatsuhiro Tsujikawa
8fab0ff216 2008-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
AuthConfigFactory is now part of DownloadEngine.
	* src/AbstractProxyRequestCommand.cc
	* src/AuthConfigFactory.h
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/FtpConnection.cc
	* src/FtpConnection.h
	* src/FtpNegotiationCommand.cc
	* src/HttpConnection.cc
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/HttpResponse.cc
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/MultiUrlRequestInfo.cc
	* src/main.cc
	* test/FtpConnectionTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
2008-11-03 10:06:25 +00:00
Tatsuhiro Tsujikawa
87a5bb50c2 2008-09-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Reverted previous change.
	Insert username+'@' to URI(after ftp://) when URI is FTP scheme 
and
	username is not in URI.
	* src/HttpRequest.cc
	* src/Request.cc
	* test/HttpRequestTest.cc
	* test/RequestTest.cc
2008-09-25 16:06:29 +00:00
Tatsuhiro Tsujikawa
92d702fa53 2008-09-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use netrc for HTTP.
	Now FTP user/password is sent in Authorization header when
	--ftp-via-http-proxy=get is given.
	* src/AuthConfigFactory.cc
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/NetrcAuthResolver.cc
	* src/NetrcAuthResolver.h
	* src/OptionHandlerFactory.cc
	* src/option_processing.cc
	* src/prefs.cc
	* src/prefs.h
	* test/AuthConfigFactoryTest.cc
	* test/HttpRequestTest.cc
	* test/NetrcAuthResolverTest.cc
2008-09-25 14:37:28 +00:00
Tatsuhiro Tsujikawa
398d53f5f5 2008-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use CookieStorage class instead of CookieBox class.
	Now CookieStorage accepts cookies from numeric host such as 
192.168.1.1.
	* src/AbstractProxyRequestCommand.cc
	* src/CookieStorage.cc
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/HttpConnection.cc
	* src/HttpConnection.h
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/HttpResponse.cc
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/Makefile.am
	* src/MultiUrlRequestInfo.cc
	* src/Request.cc
	* src/Request.h
	* src/main.cc
	* test/AllTest.cc
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/Makefile.am
	* test/NsCookieParserTest.cc
	* test/Sqlite3MozCookieParserTest.cc
	* test/nscookietest.txt
2008-09-01 13:46:03 +00:00
Tatsuhiro Tsujikawa
d791807add 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added gzip, deflate decoding support in HTTP using libz. If 
compiled
	with this feature, aria2 sends "Accept-Encoding: deflate, gzip" 
header
	to a HTTP server. If a server returns "Content-Encoding: gzip" 
or
	"Content-Encoding: deflate" then, aria2 decodes the response 
body on the
	fly and writes decoded data to a local disk.
	* README
	* README.html
	* configure.ac
	* m4/aria2_arg.m4: Added ARIA2_ARG_WITH and ARIA2_ARG_ENABLE, 
they are
	wrapper function for AC_ARG_WITH and AC_ARG_ENABLE respectively.
	* m4/libz.m4
	* src/Decoder.h
	* src/DownloadCommand.cc
	* src/DownloadCommand.h
	* src/Exception.h
	* src/GZipDecoder.cc
	* src/GZipDecoder.h
	* src/HttpHeader.cc
	* src/HttpHeader.h
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpResponse.cc
	* src/HttpResponse.h
	* src/HttpResponseCommand.cc
	* src/Makefile.am
	* test/GZipDecoderTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/gzip_decode_test.gz
2008-06-29 14:29:36 +00:00
Tatsuhiro Tsujikawa
06644332c2 2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Applied Ross's aria2-0.13.2+1-mingw-3.patch.
	* test/HttpHeaderTest.cc: Casted to off_t where it should.
	* test/HttpRequestTest.cc: Casted to off_t where it should.
2008-06-16 11:27:52 +00:00
Tatsuhiro Tsujikawa
5ea933fed1 2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Set _supportsPersistentConnection to true by default.
	* src/Request.cc
	* src/RequestGroup.cc
	* test/HttpRequestTest.cc
	* test/RequestTest.cc
2008-05-08 13:20:15 +00:00
Tatsuhiro Tsujikawa
f596de9eec 2008-05-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Reimplemented transparent metalink using Accept request header.
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/Metalink2RequestGroup.cc
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* test/HttpRequestTest.cc
2008-05-05 08:25:41 +00:00
Tatsuhiro Tsujikawa
4663902500 2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed query part from filename in HTTP download. The query part means
	the substring after "?" in URL. Firefox seems do the same thing.
	A query part is sometimes very long and not suitable to filename,
	so I think it is better to remove it from filename.
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/Request.cc
	* src/Request.h
	* test/HttpRequestTest.cc
	* test/RequestTest.cc
2008-04-27 04:09:08 +00:00
Tatsuhiro Tsujikawa
2a81fd466d 2008-04-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added build-in "Accept-Feature" support. For now only "metalink" is
	used in this header field.
	This "metalink" value is removed from the list when connecting URLs
	fed by metalink file to avoid loop in "transparent" metlaink.
	* src/HttpRequest.cc
	* src/HttpRequest.h: Renamed _userHeaders as _headers. Accept-Feature
	header is also held in this variable. Also renamed setUserHeaders as
	addHeader and it was rewritten to add header not just to clear the old
	value.
	* src/HttpRequestCommand.cc
	* src/Metalink2RequestGroup.cc: Added the code to remove "metalink"
	from "Accept-Feature" list.
	* src/RequestGroup.cc: Added "metalink" to "Accept-Feature" by default.
	* src/RequestGroup.h
	* src/TaggedItem.cc: Moved Concat class to a2functional.h.
	* src/a2functional.h: Included <string> because Concat class depends on
	it.
	* test/HttpRequestTest.cc
2008-04-25 17:44:03 +00:00
Tatsuhiro Tsujikawa
1c7c6f9898 2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten HTTP keep-alive and pipelining routine.
	* src/AbstractCommand.cc
	* src/HttpConnection.cc
	* src/HttpDownloadCommand.cc
	* src/HttpRequest.cc
	* src/HttpRequestCommand.cc
	* src/HttpResponseCommand.cc
	* src/Request.cc
	* src/Request.h
	* src/RequestGroup.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/RequestTest.cc
2008-04-22 07:15:35 +00:00
Tatsuhiro Tsujikawa
3eb74629cb 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --header option. You can specify any number of additional 
HTTP headers
	like:
	aria2 --header="X-A: 300" --header="X-B: 900" http://host/file
	Unlike other commad-line option, you can use --header option 
multiple times.
	* src/HelpItemFactory.cc
	* src/HttpRequest.{cc, h}
	* src/HttpRequestCommand.cc
	* src/OptionHandlerFactory.cc
	* src/OptionHandlerImpl.h
	* src/option_processing.cc
	* src/prefs.h
	* src/usage_text.h
	* test/HttpRequestTest.cc (testUserHeaders)
2008-04-20 06:30:44 +00:00
Tatsuhiro Tsujikawa
3505201f33 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten SharedHandle. Now copy constructor taking raw pointer 
has
	keyword explicit and SharedHandle's default constructor 
initializes
	its internal obj to null, old implementation initializes it 
using
	obj's default constructor.
	To assign null, write SharedHandle<T> x(...); x.reset();
	TODO: test/SharedHandleTest.cc needs more tests.
	* src/SharedHandle.h
2008-04-20 00:50:22 +00:00
Tatsuhiro Tsujikawa
ce5c17f1b3 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added summary log for peer announce storage.
	* src/DHTPeerAnnounceStorage.cc (handleTimeout)
	
	Removed cast
	* src/DefaultPeerStorage.cc (addPeer)

	Log exception message
	* src/DHTMessageTracker.cc (handleTimeout)

	Fixed casting
	* test/HttpRequestTest.cc
	* test/MetalinkProcessorTest.cc
	* test/PieceTest.cc
	* test/MetalinkEntryTest.cc
	* test/SequenceTest.cc
2008-03-11 12:31:14 +00:00
Tatsuhiro Tsujikawa
1b7c198289 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed "using namespace std;" from all sources. Appended std:: 
prefix to c++
	standard classes.
	Included string.h where mem* function are used.
2008-02-08 15:53:45 +00:00