Bug 20332

Summary: http fetch broke with some sites somewhere around 4.1RC3
Product: Base System Reporter: mike
Component: i386Assignee: Dag-Erling Smørgrav <des>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description mike 2000-08-01 04:20:01 UTC
newmail% fetch http://www.microsoft.com/default.htm
Receiving default.htm (15957 bytes): 100%
15957 bytes transferred in 0.3 seconds (46.87 kBps)
newmail% fetch http://www.netscape.com/index.html
Receiving index.html (4294967295 bytes): 0%
44914 bytes transferred in 1.1 seconds (38.51 kBps)
fetch: index.html appears to be truncated: 44914/4294967295 bytes
newmail%

From an older RC1 box, (4.1-RC FreeBSD 4.1-RC #0: Fri Jul 14) all is fine.

Works with microsoft and a few other locations, but gives this truncated error with other sites. So far, I have only seen it via http and not ftp. I started seeing for a few days.

This is a direct connection, no proxies.

Fix: 

Dont know
How-To-Repeat: newmail% fetch http://www.microsoft.com/default.htm
Receiving default.htm (15957 bytes): 100%
15957 bytes transferred in 0.3 seconds (46.87 kBps)
newmail% fetch http://www.netscape.com/index.html
Receiving index.html (4294967295 bytes): 0%
44914 bytes transferred in 1.1 seconds (38.51 kBps)
fetch: index.html appears to be truncated: 44914/4294967295 bytes
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-01 09:32:18 UTC
Responsible Changed
From-To: freebsd-bugs->des

DES maintains fetch(1) now.
Comment 2 mike 2000-08-01 14:27:17 UTC
Some more debug info


working
$FreeBSD: src/usr.bin/fetch/http.c,v 1.31 2000/03/08 13:02:10 cracauer Exp $
 From July 14th

non working
$FreeBSD: src/usr.bin/fetch/fetch.c,v 1.10.2.6 2000/07/26 07:56:16 des Exp $
July 28th


If at all possible, rebuild libfetch with DEBUG defined (see
instructions below) and mail me the output of failed transfers.

newmail# fetch http://www.netscape.com/index.html
scheme:   [http]
user:     []
password: []
host:     [www.netscape.com]
port:     [0]
document: [/index.html]
---> www.netscape.com:80
 >>> GET /index.html HTTP/1.1
 >>> Host: www.netscape.com
 >>> User-Agent: fetch libfetch/2.0
 >>> Connection: close
 >>>
<<< HTTP/1.1 200 OK
<<< Server: Netscape-Enterprise/4.1
<<< Date: Tue, 01 Aug 2000 13:28:19 GMT
<<< Set-Cookie: 
UIDC=207.245.238.163:0965136499:466110;domain=.netscape.com;path=/;expires=31-Dec-2010 
23:59:59 GMT
<<< Content-type: text/html
<<< Connection: close
<<<
offset: 0, length: -1, size: -1, clength: -1
Receiving index.html (4294967295 bytes): 0%
45088 bytes transferred in 0.8 seconds (53.11 kBps)
fetch: index.html appears to be truncated: 45088/4294967295 bytes

newmail# fetch http://www.sentex.net/index.html
scheme:   [http]
user:     []
password: []
host:     [www.sentex.net]
port:     [0]
document: [/index.html]
---> www.sentex.net:80
 >>> GET /index.html HTTP/1.1
 >>> Host: www.sentex.net
 >>> User-Agent: fetch libfetch/2.0
 >>> Connection: close
 >>>
<<< HTTP/1.1 200 OK
<<< Date: Tue, 01 Aug 2000 13:28:30 GMT
<<< Server: Apache/1.3.9 (Unix)
<<< Connection: close
<<< Transfer-Encoding: chunked
<<< Content-Type: text/html
<<<
offset: 0, length: -1, size: -1, clength: -1
Receiving index.html (4294967295 bytes): 0%<<< cff
_http_fillbuf(): new chunk: 3327 (3327)
<<< 0
_http_fillbuf(): end of last chunk
Receiving index.html (4294967295 bytes): 0%
3327 bytes transferred in 0.1 seconds (34.10 kBps)
fetch: index.html appears to be truncated: 3327/4294967295 bytes
newmail#

and one that works for some reason

newmail#  fetch http://www.microsoft.com/default.htm
scheme:   [http]
user:     []
password: []
host:     [www.microsoft.com]
port:     [0]
document: [/default.htm]
---> www.microsoft.com:80
 >>> GET /default.htm HTTP/1.1
 >>> Host: www.microsoft.com
 >>> User-Agent: fetch libfetch/2.0
 >>> Connection: close
 >>>
<<< HTTP/1.1 200 OK
<<< Server: Microsoft-IIS/5.0
<<< Connection: close
<<< Date: Tue, 01 Aug 2000 13:28:50 GMT
<<< Content-Type: text/html
<<< Accept-Ranges: bytes
<<< Last-Modified: Mon, 31 Jul 2000 18:09:33 GMT
last modified: [2000-07-31 18:09:33]
<<< ETag: "f4cbbb7a1afbbf1:87e"
<<< Content-Length: 15957
content length: [15957]
<<<
offset: 0, length: -1, size: -1, clength: 15957
Receiving default.htm (15957 bytes): 100%
15957 bytes transferred in 0.3 seconds (48.24 kBps)

------------------------------------------------------------------------
Mike Tancsa,                                      tel +1 519 651 3400
Sentex Communications                             mike@sentex.net
Cambridge, Ontario Canada                         www.sentex.net
Comment 3 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2000-08-02 14:04:03 UTC
State Changed
From-To: open->closed

Not broken, merely an incorrect warning. 
Fixed in -CURRENT and -STABLE.