git: 730a7d5926bc - stable/12 - Support proxying FTP over HTTPS, not just HTTP.

Renato Botelho garga at FreeBSD.org
Wed Apr 28 19:38:30 UTC 2021


The branch stable/12 has been updated by garga (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=730a7d5926bc22c951817dfc34fa4fe280f2c386

commit 730a7d5926bc22c951817dfc34fa4fe280f2c386
Author:     Dag-Erling Smørgrav <des at FreeBSD.org>
AuthorDate: 2018-11-27 10:06:41 +0000
Commit:     Renato Botelho <garga at FreeBSD.org>
CommitDate: 2021-04-28 19:30:35 +0000

    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 72165d63fd19..18fa673147d4 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)


More information about the dev-commits-src-branches mailing list