diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2018-11-27 10:06:41 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2018-11-27 10:06:41 +0000 |
commit | b68815f0886031fcccb426b85484b18a282d1b8c (patch) | |
tree | 570047b91d0dbe76c6acb8fecf940da011bb274f /lib/libfetch | |
parent | 6b938197301cfe4797b5f60f07b4f83629eeb962 (diff) | |
download | src-test-b68815f0886031fcccb426b85484b18a282d1b8c.tar.gz src-test-b68815f0886031fcccb426b85484b18a282d1b8c.zip |
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
Notes
Notes:
svn path=/head/; revision=341011
Diffstat (limited to 'lib/libfetch')
-rw-r--r-- | lib/libfetch/ftp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index 72165d63fd192..18fa673147d42 100644 --- a/lib/libfetch/ftp.c +++ b/lib/libfetch/ftp.c @@ -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) |