1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] ftp.c (getftp): Applied Piotr Sulecki <Piotr.Sulecki@ios.krakow.pl>'s

patch to work around FTP servers that incorrectly respond to the
          	"REST" command with the remaining size rather than the total
          	file size.
This commit is contained in:
dan 2000-10-20 00:28:57 -07:00
parent b77a3437a8
commit 8a9be7627d
2 changed files with 12 additions and 0 deletions

View File

@ -1,6 +1,9 @@
2000-10-19 Dan Harkless <dan-wget@dilvish.speed.net>
* ftp.c (ftp_loop_internal): downloaded_file() enumerators changed.
(getftp): Applied Piotr Sulecki <Piotr.Sulecki@ios.krakow.pl>'s
patch to work around FTP servers that incorrectly respond to the
"REST" command with the remaining size rather than the total file size.
* http.c (gethttp): Improved a comment and added code to tack on
".html" to text/html files without that extension when -E specified.

View File

@ -686,6 +686,15 @@ Error in server response, closing control connection.\n"));
}
else
fp = opt.dfp;
/* Some FTP servers return the total length of file after REST command,
others just return the remaining size. */
if (*len && restval && expected_bytes
&& (expected_bytes == *len - restval))
{
DEBUGP (("Lying FTP server found, adjusting.\n"));
expected_bytes = *len;
}
if (*len)
{