Wed 18 Jul 2007 12:05:40 PM UTC, original submission:
It seems that wget does not properly handle it when the http server responses with a wrong Content-Length (which happens with e.g. Apache without large file support serving large file).
$ wget -d http://stare.cz/~hans/.tmp/file
DEBUG output created by Wget 1.10.2 on freebsd6.2.
--11:32:14-- http://stare.cz/~hans/.tmp/file
=> `file'
Resolving stare.cz... 88.208.90.43
Caching stare.cz => 88.208.90.43
Connecting to stare.cz|88.208.90.43|:80... connected.
Created socket 3.
Releasing 0x08083220 (new refcount 1).
---request begin---
GET /~hans/.tmp/file HTTP/1.0
User-Agent: Wget/1.10.2
Accept: /
Host: stare.cz
Connection: Keep-Alive
---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.1 200 OK
Date: Wed, 18 Jul 2007 11:32:06 GMT
Server: Apache/1.3.29 (Unix) PHP/5.1.4 mod_ssl/2.8.16 OpenSSL/0.9.7g
Last-Modified: Wed, 18 Jul 2007 03:37:40 GMT
ETag: "a327514cb3c328168837b8dfb9a96e2ae115f3d3"
Accept-Ranges: bytes
Content-Length: -1073741824
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/plain
---response end---
200 OK
Registered socket 3 for persistent reuse.
Length: -1,073,741,824 [text/plain]
[<=> ] 0 --.--K/s [ <=> ] 0 --.--K/s
Abort trap: 6 (core dumped)
The core (560KB) can be downloaded at
http://stare.cz/~hans/.tmp/wget.core
The same happens with wget 1.10.2 on OpenBSD 4.0.
The server used in the example is Apache 1.3.29
as shipped with OpenBSD 3.9:
server$ httpd -V
Server version: Apache/1.3.29 (Unix)
Server built: unknown
Server's Module Magic Number: 19990320:15
Server compiled with....
-D EAPI
-D HAVE_MMAP
-D HAVE_SHMGET
-D USE_MMAP_SCOREBOARD
-D USE_MMAP_FILES
-D HAVE_FLOCK_SERIALIZED_ACCEPT
-D HAVE_SYSVSEM_SERIALIZED_ACCEPT
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D DYNAMIC_MODULE_LIMIT=64
-D HARD_SERVER_LIMIT=256
-D HTTPD_ROOT="/var/www"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/httpd.scoreboard"
-D DEFAULT_LOCKFILE="logs/httpd.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
-D ACCESS_CONFIG_FILE="conf/access.conf"
-D RESOURCE_CONFIG_FILE="conf/srm.conf"
This is the file served:
server$ ls -l ~/WWW/.tmp/file
-rw-r--r-- 1 hans hans 3221225472 Jul 18 05:37 /home/hans/WWW/.tmp/file
Jan
|