From owner-dev-commits-src-branches@freebsd.org Wed Apr 28 19:38:30 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3990B5FF096; Wed, 28 Apr 2021 19:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FVppG0FDFz3HMZ; Wed, 28 Apr 2021 19:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFD9A13B50; Wed, 28 Apr 2021 19:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13SJcTCQ064551; Wed, 28 Apr 2021 19:38:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13SJcTkb064550; Wed, 28 Apr 2021 19:38:29 GMT (envelope-from git) Date: Wed, 28 Apr 2021 19:38:29 GMT Message-Id: <202104281938.13SJcTkb064550@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Renato Botelho Subject: git: 730a7d5926bc - stable/12 - Support proxying FTP over HTTPS, not just HTTP. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: garga X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 730a7d5926bc22c951817dfc34fa4fe280f2c386 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2021 19:38:30 -0000 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 AuthorDate: 2018-11-27 10:06:41 +0000 Commit: Renato Botelho 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)