hello,

being meant to be such a powerful download tool, it seems to be at
least confusing:

file src/ftp-basic.c (function ftp_size, 1.9+cvs-dev, line 1153):

*size = strtol (respline + 4, NULL, 0);

where size is defined as "long int *" in the function's declaration.
BTW. why's the base given to strtol is "0", not "10"? isn't that too
flexible for a defined protocol?

the http.c has the same problem, where content length is defined as
"long contlen;"  and is calculated with the same "strtol (hdrval,
NULL, 10)".

The limitation seems to be hardwired throughout the source code, so it
is not that simple to me (being not familiar with the source) to
provide any diff. Having DVD ISO's becoming more usual, that are not
only bigger than 2 GB, but even bigger than 4 GB, this seems to be a
serious problem. As the example I am providing a debug output of wget
1.9.1 downloading file which size is 4 683 900 928 (yes, more than
4GB, 'tis a DVD ISO). IP addresses, pathnames and filenames are
modified (sorry), but this has nothing to do with the problem. Notice
the size returned to "SIZE" command and the size that wget reports as
"unauthoritative"... I am really unsure of what wget will do, when it
reaches the size that is "unauthoritative", will it show negative
values (like mozilla's ftp client)?..

C:\Documents and Settings\user\My Documents\Archive\Download>wget -c -d
ftp://xxx.yyy.zzz/apps/All.XXX.DVD/DVD1/all_xxx_dvd_1.iso

DEBUG output created by Wget 1.9.1 on Windows.

set_sleep_mode(): mode 0x80000001, rc 0x80000000
--18:13:28--  ftp://xxx.yyy.zzz/apps/All.XXX.DVD/DVD1/all_xxx_dvd_1.iso
           => `all_xxx_dvd_1.iso'
Resolving xxx.yyy.zzz... seconds 0.00, aaa.bbb.ccc.ddd
Caching xxx.yyy.zzz => aaa.bbb.ccc.ddd
Connecting to xxx.yyy.zzz[aaa.bbb.ccc.ddd]:21... seconds 0.00, connected.
Created socket 724.
Releasing 008928A0 (new refcount 1).
Logging in as anonymous ... 220 guess my name

--> USER anonymous

331 Please specify the password.

--> PASS -wget@

230 Login successful.
Logged in!
==> SYST ...
--> SYST

215 UNIX Type: L8
done.    ==> PWD ...
--> PWD

257 "/"
done.
==> TYPE I ...
--> TYPE I

200 Switching to Binary mode.
done.  changing working directory
Prepended initial PWD to relative path:
   pwd: '/'
   old: 'apps/All.XXX.DVD/DVD1'
  new: '/apps/All.XXX.DVD/DVD1'
==> CWD /apps/All.XXX.DVD/DVD1 ...
--> CWD /apps/All.XXX.DVD/DVD1

250 Directory successfully changed.
done.
==> SIZE all_xxx_dvd_1.iso ...
--> SIZE all_xxx_dvd_1.iso

213 4683900928
done.
==> PORT ... Master socket fd 712 bound.
using port 4027.

--> PORT eee,fff,ggg,hhh,15,187

200 PORT command successful. Consider using PASV.
done.    ==> REST 20689712 ...
--> REST 20689712

350 Restart position accepted (20689712).
done.
==> RETR all_xxx_dvd_1.iso ...
--> RETR all_xxx_dvd_1.iso

150 Opening BINARY mode data connection for all_xxx_dvd_1.iso
(4683900928 bytes).
done.
Created socket fd 704.
Length: 388,933,632 [368,243,920 to go] (unauthoritative)

 5% [+>                                   ] 22,811,092    37.54K/s  ETA 2:25:59

Reply via email to