bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] FTP download using incorrect size for "Length" with -c


From: Jozua
Subject: [Bug-wget] FTP download using incorrect size for "Length" with -c
Date: Mon, 12 Jul 2010 22:37:23 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100528 Thunderbird/3.0.5

Hi.

When continuing a ftp download, an incorrect value is used for the total file size. The SIZE command returns the correct size, but the value used comes from the response to the RETR command, which (at least in this case) is the number of bytes remaining after REST. (See below for more info).

The bug seems to be introduced by the line :
    expected_bytes = ftp_expected_bytes (ftp_last_respline);
in src/ftp.c (line 1022)

Commenting out that line seems to fix the bug, but i have no idea how it will affect things if the server does not support the SIZE command.

wget version : 1.12
server : ProFTPD 1.3.1

wget output:

--2010-07-12 21:54:05-- ftp://ftp.is.co.za/linux/distributions/fedora/linux/releases/13/Fedora/x86_64/iso/Fedora-13-x86_64-DVD.iso
           => `Fedora-13-x86_64-DVD.iso'
Resolving ftp.is.co.za (ftp.is.co.za)... 196.4.160.12
Connecting to ftp.is.co.za (ftp.is.co.za)|196.4.160.12|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /linux/distributions/fedora/linux/releases/13/Fedora/x86_64/iso ... done.
==> SIZE Fedora-13-x86_64-DVD.iso ... 3630045184
==> PASV ... done.    ==> REST 974535680 ... done.
==> RETR Fedora-13-x86_64-DVD.iso ... done.
Length: 2655517712 (2.5G), 1680973824 (1.6G) remaining (unauthoritative)

FTP conversation

TYPE I
200 Type set to I
CWD /linux/distributions/fedora/linux/releases/13/Fedora/x86_64/iso
250 CWD command successful
SIZE Fedora-13-x86_64-DVD.iso
213 3630045184
PASV
227 Entering Passive Mode (196,4,160,12,221,246).
REST 974527472
350 Restarting at 974527472. Send STORE or RETRIEVE to initiate transfer
RETR Fedora-13-x86_64-DVD.iso
150 Opening BINARY mode data connection for Fedora-13-x86_64-DVD.iso (2655517712 bytes)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]