From jason@pm1.ric-44.lft.widomaker.com  Thu Feb 19 17:41:55 2004
Return-Path: <jason@pm1.ric-44.lft.widomaker.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 45A2716A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 19 Feb 2004 17:41:55 -0800 (PST)
Received: from pm1.ric-44.lft.widomaker.com (pm1.ric-44.lft.widomaker.com [209.96.189.60])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3D5CA43D31
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 19 Feb 2004 17:41:54 -0800 (PST)
	(envelope-from jason@pm1.ric-44.lft.widomaker.com)
Received: (from jason@localhost)
	by pm1.ric-44.lft.widomaker.com (8.12.11/8.12.10) id i1K1fmRW096570;
	Thu, 19 Feb 2004 20:41:48 -0500 (EST)
Message-Id: <200402200141.i1K1fmRW096570@pm1.ric-44.lft.widomaker.com>
Date: Thu, 19 Feb 2004 20:41:48 -0500 (EST)
From: Jason Harris <jharris@widomaker.com>
Reply-To: Jason Harris <jharris@widomaker.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Jason Harris <jharris@widomaker.com>
Subject: fetch -S fails with chunked transfers
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         63099
>Category:       bin
>Synopsis:       fetch -S fails with chunked transfers
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    des
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 19 17:50:15 PST 2004
>Closed-Date:    Sat Aug 07 20:29:11 GMT 2004
>Last-Modified:  Sat Aug 07 20:29:11 GMT 2004
>Originator:     Jason Harris
>Release:        FreeBSD 4.3-RELEASE i386, FreeBSD 4.9-STABLE i386
>Organization:
none here
>Environment:
System: FreeBSD 4.3-RELEASE i386, FreeBSD 4.9-STABLE i386

>Description:

	fetch -S fails with chunked transfers
>How-To-Repeat:

	(NB:  An upcoming port uses this particular URL.)
	%/usr/bin/fetch -vvv -S 51071 http://www.ohse.de/uwe/usendmail/usendmail-0.1.6.tar.gz
>Fix:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

	whatever des@ thinks is best, or use DISABLE_SIZE=yes in ports
	that deal with publicfile and other servers that default to
	chunked transfers

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFANWWRSypIl9OdoOMRAknYAJ9VdusZXqqgMuXFj9sJsDm6mVHb1wCeJIWL
sKP0a9dr8u1TArXyDGyGpaM=
=i4UB
-----END PGP SIGNATURE-----
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->des 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sat Mar 6 00:58:58 PST 2004 
Responsible-Changed-Why:  
Assign to libfetch maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63099 

From: des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=)
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: bin/63099: fetch -S fails with chunked transfers
Date: Sat, 06 Mar 2004 13:56:49 +0100

 This has nothing to do with chunked transfers.  The problem is that
 the server does not provide a Content-Length for fetch to compare with
 the size specified on the command line; thus -S doesn't work.  Simply
 remove the SIZE line from distinfo and everything will be fine.
 
 DES
 --=20
 Dag-Erling Sm=F8rgrav - des@des.no
State-Changed-From-To: open->analyzed 
State-Changed-By: lioux 
State-Changed-When: Mon Mar 8 17:04:35 PST 2004 
State-Changed-Why:  
fetch developer (DES) points out this is not a fetch issue but 
rather a server side issue 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63099 

From: Paul de Weerd <weerd@weirdnet.nl>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: bin/63099: fetch -S fails with chunked transfers
Date: Mon, 5 Jul 2004 17:21:26 +0200

 On further discussing bug bin/68547 (ftp breaks on chunked encoding
 (http)) with a friend, we found this bugreport. fetch(1) appears to
 have (had) issues with chunked encoding too. 
 
 The workaround suggested in this report says to not use the -S flag
 when downloading files from servers that use chunked encoding.
 The manpage suggests that this is not required :
 
      -S bytes    Require the file size reported by the server to match the
                  specified value.  If it does not, a message is printed and
                  the file is not fetched.  If the server does not support
                  reporting file sizes, this option is ignored and the file is
                  fetched unconditionally.
 
 This is inconsistent with fetch's behaviour : 
 
 $ fetch -S 3307 http://www.dataloss.nl/software/patches/qmail-barelfdelay.patch
 fetch: http://www.dataloss.nl/software/patches/qmail-barelfdelay.patch: size unknown
 
 And the file is not downloaded as a result.
 
 ----- begin PATCH for /usr/src/usr.bin/fetch/fetch.1 -----------------
 
 --- fetch.1.old Mon Jul  5 15:07:00 2004
 +++ fetch.1     Mon Jul  5 15:08:19 2004
 @@ -170,6 +170,8 @@
  If it does not, a message is printed and the file is not fetched.
  If the server does not support reporting file sizes, this option is
  ignored and the file is fetched unconditionally.
 +This does not work for servers that send their data using chunked
 +encoding. In these cases, the file will not be fetched.
  .It Fl s
  Print the size in bytes of each requested file, without fetching it.
  .It Fl T Ar seconds
 
 ----- end PATCH for /usr/src/usr.bin/fetch/fetch.1 -------------------
 
 The above patch probably does not suffice. Unfortunately I'm not able
 to test other combinations.
 
 Cheers,
 
 Paul 'WEiRD' de Weerd
 
 -- 
 >++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
 +++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                  http://www.weirdnet.nl/                 

From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To: Paul de Weerd <weerd@weirdnet.nl>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/63099: fetch -S fails with chunked transfers
Date: Mon, 05 Jul 2004 17:33:16 +0200

 Please update to a more recent -STABLE (after 2004-07-01) or -CURRENT
 (after 2004-06-24).
 
 DES
 --=20
 Dag-Erling Sm=F8rgrav - des@des.no
State-Changed-From-To: analyzed->closed 
State-Changed-By: des 
State-Changed-When: Sat Aug 7 20:29:10 GMT 2004 
State-Changed-Why:  
Newer versions ignore -S when the server fails to report the document size. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63099 
>Unformatted:
