Commit Graph

15 Commits (14eee59ac4cd92f6df12487b4537282087a9895b)

Author SHA1 Message Date
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 93e5dbed32 2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed SharedHandle::isNull(). Instead we added operator* and
	operator unspecified_bool_type. Removed use of WeakHandle and
	replaced with raw pointer.
2010-11-12 12:48:48 +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 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 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 14a47f43f8 2009-10-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
If user name is embedded but password is missing in URI, first
	resolve password using .netrc. If password is found in .netrc,
	then use it as password. If not, use the password specified in
	--ftp-passwd.
	* src/AuthConfigFactory.cc
	* src/Request.cc
	* src/Request.h
	* test/AuthConfigFactoryTest.cc
2009-10-27 12:58:46 +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 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 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 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 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 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
Tatsuhiro Tsujikawa 7bf2c7751f Corrected comment 2007-12-08 10:49:20 +00:00
Tatsuhiro Tsujikawa 6b7df851d3 2007-10-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added ftp://USER:PASSWD@Servername automatic parsing.
	* src/Request.{h, cc}: Removed AuthResolvers. Added _username 
and
	_password. Recognize username and password in URI.
	* src/main.cc: Use AuthConfigFactory instead of RequestFactory.
	* src/RequestGroup.cc: Use AuthConfigFactory instead of 
RequestFactory.
	* src/RequestFactory.{h, cc}: Removed.
	* src/AuthConfigFactory.{h, cc}: New class.
	* src/FtpConnection.cc: Use AuthConfigFactory.
	* src/HttpRequest.cc: Use AuthConfigFactory.
	* test/HttpRequestTest.cc: Updated.
	* test/RequestTest.cc: Updated.
	* test/AuthConfigFactoryTest.cc: New class.
	* test/RequestFactoryTest.cc: Removed.
2007-10-30 12:48:01 +00:00