Use a Web server that gives a correct content-length for large files. Create a large file. A lynx listing shows:

[   ]  bigf                    18-May-2005 15:01  931G

And the raw HTTP header is fine as well:

HTTP/1.1 200 OK
Date: Tue, 07 Jun 2005 17:25:27 GMT
Server: Apache/2.1.3 (Unix) mod_ssl/2.1.3 OpenSSL/0.9.7a DAV/2 SVN/1.1.4
Last-Modified: Wed, 18 May 2005 09:31:55 GMT
ETag: "2a8042-d4a51001-28e1b8c0"
Accept-Ranges: bytes
Content-Length: 1000000000001
Connection: close
Content-Type: text/plain

But wget messes up:

Connecting to <ipaddr>:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: -727,379,967 [text/plain]
   [ <=>                                 ] 1,102         --.--K/s
22:29:05 (10.51 MB/s) - `bigf' saved [1102/-727379967])

The actual file length is 1102 on disk after wget exits.

Reply via email to