From owner-freebsd-net@FreeBSD.ORG Mon Jul 4 02:48:50 2005 Return-Path: X-Original-To: freebsd-net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D7D7716A41C; Mon, 4 Jul 2005 02:48:50 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F5BB43D49; Mon, 4 Jul 2005 02:48:50 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 3CAA06192; Mon, 4 Jul 2005 04:48:45 +0200 (CEST) Received: from xps.des.no (des.no [80.203.228.37]) by tim.des.no (Postfix) with ESMTP id 290CC6191; Mon, 4 Jul 2005 04:48:45 +0200 (CEST) Received: by xps.des.no (Postfix, from userid 1001) id 056EC33D38; Mon, 4 Jul 2005 04:48:44 +0200 (CEST) To: John Baldwin References: <200506281338.14511.jhb@FreeBSD.org> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Mon, 04 Jul 2005 04:48:44 +0200 In-Reply-To: <200506281338.14511.jhb@FreeBSD.org> (John Baldwin's message of "Tue, 28 Jun 2005 13:38:13 -0400") Message-ID: <86vf3rthf7.fsf@xps.des.no> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Tests: ALL_TRUSTED,AWL,BAYES_00 X-Spam-Learn: ham X-Spam-Score: -5.2/5.0 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on tim.des.no Cc: freebsd-net@FreeBSD.org Subject: Re: Bug in libfetch handling of FTP urls.. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jul 2005 02:48:51 -0000 John Baldwin writes: > Ran into this at work. Suppose I am fetching a file over ftp for a user = foo > whose home dir is /home/foo' and I want to retrieve the 'bar/baz' file ou= t of > his home directory. [...] This is tricky because libfetch caches FTP connections, so you can't always assume that CWD is ~ at the beginning of the transfer if you've already transferred something from the same host/user/password tuple in the same process. See (ironically) RFC 1738 section 3.2.5. Connection caching is an essential feature, because it has a huge impact on the speed of a network install. Although sysinstall still uses libftpio + cpio, one may hope that it will one day in the not- too-distant future switch to libfetch + libarchive. > I verified this by doing 'fetch -vv' and seeing that it does one big CWD > (instead of the multiple CWD's the RFC says should happen) and that it > includes the leading '/' when it should not. I am currently testing a patch for this. > Also, it seems that fetch ignores the ';type=3DX' optional part of the ur= l-path > and always uses TYPE I. Correct, that was never implemented. At the very least, the typecode should be stripped from the URL. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no