summaryrefslogtreecommitdiff
path: root/src/FtpInitiateConnectionCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-09-26 23:00:05 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-09-26 23:00:05 +0900
commita20e279606f0a1e0e388a7d39a81cc62fc69f6c8 (patch)
tree7d98565cf228a47c027f36885efea331e5c40e8d /src/FtpInitiateConnectionCommand.cc
parentc13dc166dec73d93dbc05d5cbb53e51dac5d4dc8 (diff)
Use std::string for SocketPoolEntry::options_
Currently, we only store 1 value for FTP download. std::map is overkill in the this situation.
Diffstat (limited to 'src/FtpInitiateConnectionCommand.cc')
-rw-r--r--src/FtpInitiateConnectionCommand.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/FtpInitiateConnectionCommand.cc b/src/FtpInitiateConnectionCommand.cc
index 0a5951da..2700b85f 100644
--- a/src/FtpInitiateConnectionCommand.cc
+++ b/src/FtpInitiateConnectionCommand.cc
@@ -76,7 +76,7 @@ Command* FtpInitiateConnectionCommand::createNextCommand
{
Command* command;
if(proxyRequest) {
- std::map<std::string, std::string> options;
+ std::string options;
SharedHandle<SocketCore> pooledSocket;
std::string proxyMethod = resolveProxyMethod(getRequest()->getProtocol());
if(proxyMethod == V_GET) {
@@ -124,12 +124,13 @@ Command* FtpInitiateConnectionCommand::createNextCommand
} else {
setConnectedAddrInfo(getRequest(), hostname, pooledSocket);
if(proxyMethod == V_TUNNEL) {
+ // options contains "baseWorkingDir"
command =
new FtpNegotiationCommand(getCuid(), getRequest(), getFileEntry(),
getRequestGroup(), getDownloadEngine(),
pooledSocket,
FtpNegotiationCommand::SEQ_SEND_CWD_PREP,
- options["baseWorkingDir"]);
+ options);
} else if(proxyMethod == V_GET) {
// Use GET for FTP via HTTP proxy.
getRequest()->setMethod(Request::METHOD_GET);
@@ -150,7 +151,7 @@ Command* FtpInitiateConnectionCommand::createNextCommand
}
}
} else {
- std::map<std::string, std::string> options;
+ std::string options;
SharedHandle<SocketCore> pooledSocket =
getDownloadEngine()->popPooledSocket
(options, resolvedAddresses,
@@ -169,12 +170,13 @@ Command* FtpInitiateConnectionCommand::createNextCommand
getRequest()->setConnectedAddrInfo(hostname, addr, port);
command = c;
} else {
+ // options contains "baseWorkingDir"
command =
new FtpNegotiationCommand(getCuid(), getRequest(), getFileEntry(),
getRequestGroup(), getDownloadEngine(),
pooledSocket,
FtpNegotiationCommand::SEQ_SEND_CWD_PREP,
- options["baseWorkingDir"]);
+ options);
setConnectedAddrInfo(getRequest(), hostname, pooledSocket);
}
}