mirror of https://github.com/aria2/aria2
Accept https:// and ftp:// in proxy options and environment variables.
parent
954d595ee8
commit
3574f6bd7d
|
@ -628,10 +628,13 @@ void HttpProxyOptionHandler::parseArg(Option& option, const std::string& optarg)
|
|||
} else {
|
||||
Request req;
|
||||
std::string uri;
|
||||
if(util::startsWith(optarg, "http://")) {
|
||||
if(util::startsWith(optarg, "http://") ||
|
||||
util::startsWith(optarg, "https://") ||
|
||||
util::startsWith(optarg, "ftp://")) {
|
||||
uri = optarg;
|
||||
} else {
|
||||
uri = "http://"+optarg;
|
||||
uri = "http://";
|
||||
uri += optarg;
|
||||
}
|
||||
if(!req.setUri(uri)) {
|
||||
throw DL_ABORT_EX(_("unrecognized proxy format"));
|
||||
|
|
Loading…
Reference in New Issue