From 730a7d5926bc22c951817dfc34fa4fe280f2c386 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Tue, 27 Nov 2018 10:06:41 +0000 Subject: [PATCH] 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 Approved by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit b68815f0886031fcccb426b85484b18a282d1b8c) --- lib/libfetch/ftp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index 72165d63fd1..18fa673147d 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) -- 2.45.0