diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-09-16 10:57:27 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-09-16 10:57:27 +0000 |
| commit | a1bac34778519a874912f28e625935272afb1779 (patch) | |
| tree | 17a8e9b3dfb09e839bf9216c59e9bf08d304ff1b /src/AbstractCommand.cc | |
| parent | c921529d68a74fe6af34023d530763673aa1972e (diff) | |
2008-09-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Moved isProxyGETRequest function outside #ifdef ENABLE_ASYNC_DNS
clause
to fix compile error when async DNS is not enabled by
configuration.
* src/AbstractCommand.cc
Diffstat (limited to 'src/AbstractCommand.cc')
| -rw-r--r-- | src/AbstractCommand.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/AbstractCommand.cc b/src/AbstractCommand.cc index 0127c888..4b02dfd0 100644 --- a/src/AbstractCommand.cc +++ b/src/AbstractCommand.cc @@ -269,6 +269,19 @@ void AbstractCommand::setWriteCheckSocket(const SocketHandle& socket) { } } +static bool isProxyGETRequest(const std::string& protocol, const Option* option) +{ + return + // For HTTP/HTTPS + ((protocol == Request::PROTO_HTTP || protocol == Request::PROTO_HTTPS) && + (option->getAsBool(PREF_HTTP_PROXY_ENABLED) && + option->get(PREF_HTTP_PROXY_METHOD) == V_GET)) || + // For FTP + (protocol == Request::PROTO_FTP && + (option->getAsBool(PREF_HTTP_PROXY_ENABLED) && + option->get(PREF_FTP_VIA_HTTP_PROXY) == V_GET)); +} + #ifdef ENABLE_ASYNC_DNS bool AbstractCommand::isAsyncNameResolverInitialized() const @@ -284,19 +297,6 @@ void AbstractCommand::initAsyncNameResolver(const std::string& hostname) setNameResolverCheck(_asyncNameResolver); } -static bool isProxyGETRequest(const std::string& protocol, const Option* option) -{ - return - // For HTTP/HTTPS - ((protocol == Request::PROTO_HTTP || protocol == Request::PROTO_HTTPS) && - (option->getAsBool(PREF_HTTP_PROXY_ENABLED) && - option->get(PREF_HTTP_PROXY_METHOD) == V_GET)) || - // For FTP - (protocol == Request::PROTO_FTP && - (option->getAsBool(PREF_HTTP_PROXY_ENABLED) && - option->get(PREF_FTP_VIA_HTTP_PROXY) == V_GET)); -} - bool AbstractCommand::asyncResolveHostname() { switch(_asyncNameResolver->getStatus()) { |
