summaryrefslogtreecommitdiff
path: root/src/AbstractCommand.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-04-06 16:09:24 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-04-06 16:09:24 +0000
commitdd7590f927f73a887f579aba6f309e1539943e6d (patch)
treee01734e1403ea7ec0322930b9c422f4be8ef9897 /src/AbstractCommand.h
parent538c463fc0f9b7c2be2fb641bce106e015c401dd (diff)
2010-04-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that FTP data connection is not established via proxy when --ftp-proxy is defined and --ftp-pasv=true and --proxy-method=tunnel. * src/AbstractCommand.cc * src/AbstractCommand.h * src/FtpNegotiationCommand.cc * src/FtpNegotiationCommand.h * src/InitiateConnectionCommand.cc
Diffstat (limited to 'src/AbstractCommand.h')
-rw-r--r--src/AbstractCommand.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/AbstractCommand.h b/src/AbstractCommand.h
index 6f9393f6..8e7e6e98 100644
--- a/src/AbstractCommand.h
+++ b/src/AbstractCommand.h
@@ -77,6 +77,14 @@ protected:
const std::vector<std::string>& getResolvedAddresses();
#endif // ENABLE_ASYNC_DNS
+ // Resolves hostname. The resolved addresses are stored in addrs
+ // and first element is returned. If resolve is not finished,
+ // return empty string. In this case, call this function with same
+ // arguments until resolved address is returned. Exception is
+ // thrown on error. port is used for retrieving cached addresses.
+ std::string resolveHostname
+ (std::vector<std::string>& addrs, const std::string& hostname, uint16_t port);
+
void tryReserved();
virtual bool prepareForRetry(time_t wait);
virtual void onAbort();
@@ -125,7 +133,6 @@ protected:
*/
SharedHandle<Request> createProxyRequest() const;
-
// Returns proxy method for given protocol. Either V_GET or V_TUNNEL
// is returned. For HTTPS, always returns V_TUNNEL.
const std::string& resolveProxyMethod(const std::string& protocol) const;
@@ -149,7 +156,6 @@ private:
void disableNameResolverCheck(const SharedHandle<AsyncNameResolver>& resolver);
bool nameResolveFinished() const;
-
#endif // ENABLE_ASYNC_DNS
public:
AbstractCommand(cuid_t cuid, const SharedHandle<Request>& req,