From owner-freebsd-arch Fri May 12 13:21:18 2000 Delivered-To: freebsd-arch@freebsd.org Received: from peace.mahoroba.org (peace.calm.imasy.or.jp [202.227.26.34]) by hub.freebsd.org (Postfix) with ESMTP id 049C837B526 for ; Fri, 12 May 2000 13:21:09 -0700 (PDT) (envelope-from ume@mahoroba.org) Received: from localhost (IDENT:8McjGaEWyrynTs/sgP+FW8+k4Udm0fnYCqAuJDW9fGVCVdGQUCZgahO9ysDeXU4+@localhost [::1]) by peace.mahoroba.org (8.10.1/3.7W-peace) with ESMTP id e4CKGtF38185; Sat, 13 May 2000 05:16:55 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sat, 13 May 2000 05:16:55 +0900 (JST) Message-Id: <200005122016.e4CKGtF38185@peace.mahoroba.org> To: des@flood.ping.uio.no Cc: arch@freebsd.org Subject: Re: fetch(1) In-Reply-To: References: X-Mailer: xcite1.20> Mew version 1.94.2 on Emacs 20.6 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-OS: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Hajimu UMEMOTO (=?ISO-2022-JP?B?GyRCR19LXBsoQiA=?= =?ISO-2022-JP?B?GyRCSCUbKEI=?=) X-Dispatcher: imput version 20000228(IM140) Lines: 35 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >>>>> On 11 May 2000 18:07:43 +0200 >>>>> Dag-Erling Smorgrav said: des> I'm still waiting for comments about my libfetch-based fetch(1). Get des> the latest tarball from . des> (note that it needs -CURRENT's libfetch to work) I wrote IPv6 support part of it and now testing. http://www.imasy.or.jp/~ume/ipv6/FreeBSD/libfetch-ipv6.diff.gz http://www.imasy.or.jp/~ume/ipv6/FreeBSD/fetch-20000508-ipv6.diff Your fetch(1) doesn't handle content size correctly on some case. If HTTP server doesn't reply Content-Length:, fetchStat() (fetchStatHTTP()) doesn't return -1 and doesn't touch us.size. Then, the value of us.size stays unknown. --- fetch.c.orig Mon May 8 16:28:00 2000 +++ fetch.c Sat May 13 05:10:38 2000 @@ -129,7 +139,8 @@ * alarm(timeout) further down. */ fetchTimeout = timeout; - + + us.size = -1; alarm(timeout); if (fetchStat(url, &us, flags) == -1) { warnx("%s: size not known", path); -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message