mirror of https://github.com/aria2/aria2
2008-11-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Renamed --http-proxy-method as --proxy-method. * src/AbstractCommand.cc * src/FtpInitiateConnectionCommand.cc * src/HttpInitiateConnectionCommand.cc * src/OptionHandlerFactory.cc * src/option_processing.cc * src/prefs.cc * src/prefs.h * src/usage_text.hpull/1/head
parent
c7fb678e6e
commit
bd2ead4763
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2008-11-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Renamed --http-proxy-method as --proxy-method.
|
||||
* src/AbstractCommand.cc
|
||||
* src/FtpInitiateConnectionCommand.cc
|
||||
* src/HttpInitiateConnectionCommand.cc
|
||||
* src/OptionHandlerFactory.cc
|
||||
* src/option_processing.cc
|
||||
* src/prefs.cc
|
||||
* src/prefs.h
|
||||
* src/usage_text.h
|
||||
|
||||
2008-11-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Deprecated --http-proxy-user and --http-proxy-passwd options.
|
||||
|
|
|
@ -323,7 +323,7 @@ static bool isProxyRequest(const std::string& protocol, const Option* option)
|
|||
|
||||
static bool isProxyGETRequest(const std::string& protocol, const Option* option)
|
||||
{
|
||||
if(option->get(PREF_HTTP_PROXY_METHOD) != V_GET) {
|
||||
if(option->get(PREF_PROXY_METHOD) != V_GET) {
|
||||
return false;
|
||||
}
|
||||
return isProxyRequest(protocol, option);
|
||||
|
|
|
@ -74,7 +74,7 @@ Command* FtpInitiateConnectionCommand::createNextCommand
|
|||
socket->establishConnection(resolvedAddresses.front(),
|
||||
proxyRequest->getPort());
|
||||
|
||||
if(e->option->get(PREF_HTTP_PROXY_METHOD) == V_GET) {
|
||||
if(e->option->get(PREF_PROXY_METHOD) == V_GET) {
|
||||
SharedHandle<HttpConnection> hc
|
||||
(new HttpConnection(cuid, socket, e->option));
|
||||
|
||||
|
@ -82,7 +82,7 @@ Command* FtpInitiateConnectionCommand::createNextCommand
|
|||
new HttpRequestCommand(cuid, req, _requestGroup, hc, e, socket);
|
||||
c->setProxyRequest(proxyRequest);
|
||||
command = c;
|
||||
} else if(e->option->get(PREF_HTTP_PROXY_METHOD) == V_TUNNEL) {
|
||||
} else if(e->option->get(PREF_PROXY_METHOD) == V_TUNNEL) {
|
||||
command = new FtpTunnelRequestCommand(cuid, req, _requestGroup, e,
|
||||
proxyRequest, socket);
|
||||
} else {
|
||||
|
|
|
@ -103,12 +103,12 @@ Command* HttpInitiateConnectionCommand::createNextCommand
|
|||
|
||||
bool HttpInitiateConnectionCommand::useProxyGet() const
|
||||
{
|
||||
return e->option->get(PREF_HTTP_PROXY_METHOD) == V_GET;
|
||||
return e->option->get(PREF_PROXY_METHOD) == V_GET;
|
||||
}
|
||||
|
||||
bool HttpInitiateConnectionCommand::useProxyTunnel() const
|
||||
{
|
||||
return e->option->get(PREF_HTTP_PROXY_METHOD) == V_TUNNEL;
|
||||
return e->option->get(PREF_PROXY_METHOD) == V_TUNNEL;
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
|
@ -471,15 +471,6 @@ OptionHandlers OptionHandlerFactory::createOptionHandlers()
|
|||
op->addTag(TAG_HTTP);
|
||||
handlers.push_back(op);
|
||||
}
|
||||
{
|
||||
SharedHandle<OptionHandler> op(new ParameterOptionHandler
|
||||
(PREF_HTTP_PROXY_METHOD,
|
||||
TEXT_HTTP_PROXY_METHOD,
|
||||
V_TUNNEL,
|
||||
V_GET, V_TUNNEL));
|
||||
op->addTag(TAG_HTTP);
|
||||
handlers.push_back(op);
|
||||
}
|
||||
{
|
||||
SharedHandle<OptionHandler> op(new DefaultOptionHandler
|
||||
(PREF_HTTP_USER,
|
||||
|
@ -612,8 +603,18 @@ OptionHandlers OptionHandlerFactory::createOptionHandlers()
|
|||
(PREF_ALL_PROXY,
|
||||
TEXT_ALL_PROXY,
|
||||
NO_DEFAULT_VALUE));
|
||||
op->addTag(TAG_HTTP);
|
||||
op->addTag(TAG_FTP);
|
||||
op->addTag(TAG_HTTP);
|
||||
handlers.push_back(op);
|
||||
}
|
||||
{
|
||||
SharedHandle<OptionHandler> op(new ParameterOptionHandler
|
||||
(PREF_PROXY_METHOD,
|
||||
TEXT_PROXY_METHOD,
|
||||
V_TUNNEL,
|
||||
V_GET, V_TUNNEL));
|
||||
op->addTag(TAG_FTP);
|
||||
op->addTag(TAG_HTTP);
|
||||
handlers.push_back(op);
|
||||
}
|
||||
// BitTorrent/Metalink Options
|
||||
|
|
|
@ -117,7 +117,7 @@ Option* option_processing(int argc, char* const argv[])
|
|||
{ PREF_FTP_TYPE.c_str(), required_argument, &lopt, 11 },
|
||||
{ PREF_FTP_PASV.c_str(), no_argument, NULL, 'p' },
|
||||
{ "ftp-via-http-proxy", required_argument, &lopt, 12 },
|
||||
{ PREF_HTTP_PROXY_METHOD.c_str(), required_argument, &lopt, 14 },
|
||||
{ "http-proxy-method", required_argument, &lopt, 14 },
|
||||
{ PREF_LOWEST_SPEED_LIMIT.c_str(), required_argument, &lopt, 200 },
|
||||
{ PREF_MAX_DOWNLOAD_LIMIT.c_str(), required_argument, &lopt, 201 },
|
||||
{ PREF_FILE_ALLOCATION.c_str(), required_argument, 0, 'a' },
|
||||
|
@ -164,6 +164,7 @@ Option* option_processing(int argc, char* const argv[])
|
|||
{ PREF_HTTPS_PROXY.c_str(), required_argument, &lopt, 227 },
|
||||
{ PREF_FTP_PROXY.c_str(), required_argument, &lopt, 228 },
|
||||
{ PREF_ALL_PROXY.c_str(), required_argument, &lopt, 229 },
|
||||
{ PREF_PROXY_METHOD.c_str(), required_argument, &lopt, 230 },
|
||||
#if defined ENABLE_BITTORRENT || defined ENABLE_METALINK
|
||||
{ PREF_SHOW_FILES.c_str(), no_argument, NULL, 'S' },
|
||||
{ PREF_SELECT_FILE.c_str(), required_argument, &lopt, 21 },
|
||||
|
@ -257,8 +258,10 @@ Option* option_processing(int argc, char* const argv[])
|
|||
<< std::endl;
|
||||
exit(EXIT_FAILURE);
|
||||
case 14:
|
||||
cmdstream << PREF_HTTP_PROXY_METHOD << "=" << optarg << "\n";
|
||||
break;
|
||||
std::cout << "--http-proxy-method was deprecated."
|
||||
<< " Use --proxy-method option instead."
|
||||
<< std::endl;
|
||||
exit(EXIT_FAILURE);
|
||||
case 15:
|
||||
cmdstream << PREF_LISTEN_PORT << "=" << optarg << "\n";
|
||||
break;
|
||||
|
@ -427,6 +430,9 @@ Option* option_processing(int argc, char* const argv[])
|
|||
case 229:
|
||||
cmdstream << PREF_ALL_PROXY << "=" << optarg << "\n";
|
||||
break;
|
||||
case 230:
|
||||
cmdstream << PREF_PROXY_METHOD << "=" << optarg << "\n";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ const std::string PREF_HTTPS_PROXY("https-proxy");
|
|||
const std::string PREF_FTP_PROXY("ftp-proxy");
|
||||
const std::string PREF_ALL_PROXY("all-proxy");
|
||||
// values: get | tunnel
|
||||
const std::string PREF_HTTP_PROXY_METHOD("http-proxy-method");
|
||||
const std::string PREF_PROXY_METHOD("proxy-method");
|
||||
const std::string V_GET("get");
|
||||
const std::string V_TUNNEL("tunnel");
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ extern const std::string PREF_HTTPS_PROXY;
|
|||
extern const std::string PREF_FTP_PROXY;
|
||||
extern const std::string PREF_ALL_PROXY;
|
||||
// values: get | tunnel
|
||||
extern const std::string PREF_HTTP_PROXY_METHOD;
|
||||
extern const std::string PREF_PROXY_METHOD;
|
||||
extern const std::string V_GET;
|
||||
extern const std::string V_TUNNEL;
|
||||
|
||||
|
|
|
@ -79,8 +79,8 @@ _(" --all-proxy=PROXY Use this proxy server in the all protocols.\n"\
|
|||
_(" --http-user=USER Set HTTP user. This affects all URLs.")
|
||||
#define TEXT_HTTP_PASSWD \
|
||||
_(" --http-passwd=PASSWD Set HTTP password. This affects all URLs.")
|
||||
#define TEXT_HTTP_PROXY_METHOD \
|
||||
_(" --http-proxy-method=METHOD Set the method to use in proxy request.")
|
||||
#define TEXT_PROXY_METHOD \
|
||||
_(" --proxy-method=METHOD Set the method to use in proxy request.")
|
||||
#define TEXT_HTTP_AUTH_SCHEME \
|
||||
_(" --http-auth-scheme=SCHEME Set HTTP authentication scheme. Currently, basic\n"\
|
||||
" is the only supported scheme.")
|
||||
|
|
Loading…
Reference in New Issue