bugGNU Wget - Bugs: bug #20512, wget dumps core on wrong...

 
 

bug #20512: wget dumps core on wrong Content-Length

Submitted by:  None
Submitted on:  Wed 18 Jul 2007 12:05:40 PM UTC  
 
Category: Crash/Freeze/InfloopSeverity: 5 - Blocker
Priority: 5 - NormalStatus: Fixed In Repository
Privacy: PublicAssigned to: Micah Cowan <micahcowan>
Originator Name: Jan StaryOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 1.10.2
Operating System: *BSDReproducibility: Every Time
Fixed Release: 1.11Planned Release: 1.11
Regression: NoneWork Required: 1 - Days
Patch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 26 Jul 2007 02:58:47 AM UTC, comment #2:

Confirmed for current trunk on GNU/Linux as well.

Micah Cowan <micahcowan>In charge of this item.
Wed 18 Jul 2007 12:13:04 PM UTC, comment #1:

Replying to myself, yes, using the --ignore-length
option wgets the large file all right.

Anonymous
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

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by micahcowan (Updated the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 31 Jul 2007 10:40:32 PM UTCmicahcowanStatusNone=>Fixed In Repository
      Assigned toNone=>micahcowan
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>1.11
    Wed 18 Jul 2007 06:22:25 PM UTCmicahcowanSeverity3 - Normal=>5 - Blocker
      Planned ReleaseNone=>1.11
      Work RequiredNone=>1 - Days

    Back to the top


    Powered by Savane 3.1-cleanup1