Browse Source

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
Tatsuhiro Tsujikawa 17 years ago
parent
commit
a1bac34778
2 changed files with 19 additions and 13 deletions
  1. 6 0
      ChangeLog
  2. 13 13
      src/AbstractCommand.cc

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+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
+
 2008-09-14  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	If establishing conneciton to a server is failed, then mark error on

+ 13 - 13
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()) {