summaryrefslogtreecommitdiff
path: root/src/NetrcAuthResolver.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-03-27 16:16:44 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-03-27 16:16:44 +0000
commit6e6ba30c603826718b159cb1c0800b20147c23c7 (patch)
tree80e45880d16a2a9eb468b2f673f400cc709f72f7 /src/NetrcAuthResolver.h
parent9b73454b07dc23e2aaf08baf6eff1643590e30f3 (diff)
2007-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To add the command-line option which disables netrc support: * src/OptionHandlerFactory.cc (createOptionHandlers): Added PREF_NO_NETRC. * src/main.cc: Added -n option. * src/prefs.h (PREF_NO_NETRC): New definition. * src/RequestFactory.cc: Do not use netrc in ftp if PREF_NO_NETRC is V_TRUE. Note that netrc is not used in http, http proxy even if PREF_NO_NETRC is V_FALSE. This may get configurable in the future release. To clear peer's error status by time basis: * src/PeerAbstractCommand.cc (onAbort): Call Peer::startBadCondition(). * src/Peer.h, src/Peer.cc (error): Removed. (_badConditionStartTime): New variable. (_badConditionInterval): New variable. Initialized to 10 seconds. (startBadCondition): New function. (isGood): New function. * src/DefaultPeerStorage.cc (addPeer): Use Peer::isGood(). (FindFinePeer): Use Peer::isGood(). Always include port number in http request header: * src/HttpRequest.cc (getHostText): Always include port number in http request header.
Diffstat (limited to 'src/NetrcAuthResolver.h')
-rw-r--r--src/NetrcAuthResolver.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/NetrcAuthResolver.h b/src/NetrcAuthResolver.h
index 3c204adc..098b33dc 100644
--- a/src/NetrcAuthResolver.h
+++ b/src/NetrcAuthResolver.h
@@ -52,6 +52,12 @@ public:
{
_netrc = netrc;
}
+
+ NetrcHandle getNetrc() const
+ {
+ return _netrc;
+ }
+
};
typedef SharedHandle<NetrcAuthResolver> NetrcAuthResolverHandle;