mirror of
https://github.com/aria2/aria2.git
synced 2024-12-14 01:18:40 +00:00
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
This commit is contained in:
parent
c921529d68
commit
a1bac34778
@ -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
|
||||
|
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user