diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-03-27 16:16:44 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-03-27 16:16:44 +0000 |
| commit | 6e6ba30c603826718b159cb1c0800b20147c23c7 (patch) | |
| tree | 80e45880d16a2a9eb468b2f673f400cc709f72f7 /src/AbstractProxyRequestCommand.cc | |
| parent | 9b73454b07dc23e2aaf08baf6eff1643590e30f3 (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/AbstractProxyRequestCommand.cc')
| -rw-r--r-- | src/AbstractProxyRequestCommand.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/AbstractProxyRequestCommand.cc b/src/AbstractProxyRequestCommand.cc index 9c01ddbb..d4142045 100644 --- a/src/AbstractProxyRequestCommand.cc +++ b/src/AbstractProxyRequestCommand.cc @@ -34,6 +34,7 @@ /* copyright --> */ #include "AbstractProxyRequestCommand.h" #include "HttpConnection.h" +#include "prefs.h" AbstractProxyRequestCommand::AbstractProxyRequestCommand(int cuid, const RequestHandle& req, @@ -50,6 +51,7 @@ bool AbstractProxyRequestCommand::executeInternal() { socket->setBlockingMode(); HttpRequestHandle httpRequest = new HttpRequest(); + httpRequest->setUserAgent(e->option->get(PREF_USER_AGENT)); httpRequest->setRequest(req); httpRequest->configure(e->option); |
