From 92d702fa5349c722c6b59256bafe552c8b5cd8a1 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 25 Sep 2008 14:37:28 +0000 Subject: 2008-09-25 Tatsuhiro Tsujikawa 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 --- src/AuthConfigFactory.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/AuthConfigFactory.cc') diff --git a/src/AuthConfigFactory.cc b/src/AuthConfigFactory.cc index 9291e442..bbcdba1b 100644 --- a/src/AuthConfigFactory.cc +++ b/src/AuthConfigFactory.cc @@ -88,11 +88,12 @@ AuthConfigFactory::createAuthConfig(const std::string& user, const std::string& AuthResolverHandle AuthConfigFactory::createHttpAuthResolver() const { AbstractAuthResolverHandle resolver; - if(true || _option->getAsBool(PREF_NO_NETRC)) { + if(_option->getAsBool(PREF_NO_NETRC)) { resolver.reset(new DefaultAuthResolver()); } else { NetrcAuthResolverHandle authResolver(new NetrcAuthResolver()); authResolver->setNetrc(_netrc); + authResolver->ignoreDefault(); resolver = authResolver; } resolver->setUserDefinedAuthConfig(createAuthConfig(_option->get(PREF_HTTP_USER), _option->get(PREF_HTTP_PASSWD))); -- cgit