Skip site navigation (1)Skip section navigation (2)
Date:      28 May 1999 11:21:13 +0200
From:      Dag-Erling Smorgrav <des@flood.ping.uio.no>
To:        Sheldon Hearn <sheldonh@uunet.co.za>
Cc:        hackers@freebsd.org
Subject:   Re: fetch(1) / fetch(3) patchkit available
Message-ID:  <xzpso8ho8hi.fsf@localhost.ping.uio.no>
In-Reply-To: Sheldon Hearn's message of "Fri, 28 May 1999 10:52:21 %2B0200"
References:  <41042.927881541@axl.noc.iafrica.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Sheldon Hearn <sheldonh@uunet.co.za> writes:
> On 28 May 1999 10:29:44 +0200, Dag-Erling Smorgrav wrote:
> > I brushed the dust off a bunch of patches I had for libfetch and the
> > fetch(1) command and made a patchkit of them [...]
> Your mail has brought to mind a question I've never managed to sort out
> in my head and which I'm loath to post to the list for fear of holy war.
> Why do we need a fetch command in the here and now, when ftp appears to
> provide equivalent functionality?

Good question. The best answer I can give is "do one thing, and do it
well". Adding http functionality to ftp(1) was IMHO wrong. Ftp(1)
should concentrate on providing an interactive interface to the FTP
protocol, and leave the rest to fetch(1).

We need generic FTP and HTTP functionality for a variety of
applications (first and foremost, sysinstall and pkg_add(1)), and we
need a command-line interface to the FTP and HTTP protocols
(fetch(1)). We also need an interactive interface to the FTP protocol
(for doing stuff like proxying). These are two very different needs;
the fetch(3) library is well suited to the former three applications
(sysinstall, pkg_add(1) and fetch(1)) but poorly suited to the latter
(ftp(1)).

We could of course modify ftp(1) to use libfetch for URL parsing and
for HTTP, and its own code for FTP... but I would consider that
extremely ugly.

Anyway, the patchkit doesn't really add much - it reimplements
fetch(1) using the fetch(3) library, so we centralize FTP and HTTP
functionality in one single library and avoid duplicating code (and
bugs!) all over the place.

(for the historically impaired, I originally wrote libfetch at
Jordan's request for this exact purpose - it was intended to become
the backend for the new installation suite, but I haven't heard from
Eugene Skepner in over half a year.)

DES
-- 
Dag-Erling Smorgrav - des@flood.ping.uio.no


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpso8ho8hi.fsf>