From owner-cvs-all Thu Aug 30 6:39:33 2001 Delivered-To: cvs-all@freebsd.org Received: from mail.newgold.net (aphex.newgold.net [209.42.222.44]) by hub.freebsd.org (Postfix) with SMTP id E7BAD37B408 for ; Thu, 30 Aug 2001 06:39:24 -0700 (PDT) (envelope-from jmallett@mail.newgold.net) Received: (qmail 75980 invoked by uid 1000); 30 Aug 2001 13:39:20 -0000 Date: Thu, 30 Aug 2001 13:39:20 +0000 From: Joseph Mallett To: Dima Dorfman Cc: "Andrey A. Chernov" , Mike Barcroft , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/ftp fetch.c Message-ID: <20010830133920.A75950@NewGold.NET> References: <20010830130536.A75112@NewGold.NET>; <20010830132612.4952B3E2F@bazooka.unixfreak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010830132612.4952B3E2F@bazooka.unixfreak.org> User-Agent: Mutt/1.3.21i Organisation: New Gold Technology Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Aug 30, 2001 at 06:26:07AM -0700, Dima Dorfman wrote: > Joseph Mallett wrote: > > On Thu, Aug 30, 2001 at 12:33:39PM +0400, Andrey A. Chernov wrote: > > > On Wed, Aug 29, 2001 at 17:57:35 -0700, Mike Barcroft wrote: > > > > mike 2001/08/29 17:57:35 PDT > > > > > > > > Modified files: > > > > usr.bin/ftp fetch.c > > > > Log: > > > > Add support for HTTP/1.1 name-based virtual hosts. Also, use > > > > > > Are you sure that fetch can handle HTTP/1.1 "206 Partial Content" response > > > (which may happens if you issue HTTP/1.1 request)? > > > > > > > Currently, I believe it only reacts to "200" (or so a header leads me to > > think), I'll go through the standard and read about this and see if I can > > make a patch, and if one is needed. > > Why does ftp(1) have HTTP capability, anyway? I think the only reason > someone would use it instead of fetch(1) is when they want an > interactive interface, which ftp(1) provides for FTP, but not HTTP. > If it really does need HTTP capability for some reason, it should > really use fetch(3). Why duplicate code when it's not necessary? Because this is how it was yesterday and the day before that and the day before that. Ever since lukem's enhancements to NetBSD ftp(1) were pulled up. And NetBSD didn't/doesn't (correct me if I am wrong) have fetch(3), so it had all of this on its own... And importing lukemftp again (as a lot of people seem to want) will just bring in more duplicated code as far as protocol support, etc. I see no reason it could not be modifyed to use fetch(3) in some circumstances, the only time it can't is in interactive mode when parsing a URL, so one can do something like: ftp ftp://ftp.ibiblio.org/pub/gnu/ But other than that, for url_get stuff, you could probably use fetch(3), which means you could probably use fetch(3) for all HTTP. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message