Support proxying FTP over HTTPS, not just HTTP.

There is probably a PR for this, but I can't find this, or remember who
submitted it.  The patch got lost in the noise of another that wasn't
ready to commit.

MFC after:	3 days
This commit is contained in:
Dag-Erling Smørgrav 2018-11-27 10:06:41 +00:00
parent 6b93819730
commit b68815f088
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=341011

View file

@ -1104,7 +1104,8 @@ ftp_request(struct url *url, const char *op, struct url_stat *us,
int oflag;
/* check if we should use HTTP instead */
if (purl && strcasecmp(purl->scheme, SCHEME_HTTP) == 0) {
if (purl && (strcasecmp(purl->scheme, SCHEME_HTTP) == 0 ||
strcasecmp(purl->scheme, SCHEME_HTTPS) == 0)) {
if (strcmp(op, "STAT") == 0)
return (http_request(url, "HEAD", us, purl, flags));
else if (strcmp(op, "RETR") == 0)