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:
parent
b77a3437a8
commit
8a9be7627d
@ -1,6 +1,9 @@
|
|||||||
2000-10-19 Dan Harkless <dan-wget@dilvish.speed.net>
|
2000-10-19 Dan Harkless <dan-wget@dilvish.speed.net>
|
||||||
|
|
||||||
* ftp.c (ftp_loop_internal): downloaded_file() enumerators changed.
|
* 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
|
* http.c (gethttp): Improved a comment and added code to tack on
|
||||||
".html" to text/html files without that extension when -E specified.
|
".html" to text/html files without that extension when -E specified.
|
||||||
|
@ -687,6 +687,15 @@ Error in server response, closing control connection.\n"));
|
|||||||
else
|
else
|
||||||
fp = opt.dfp;
|
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)
|
if (*len)
|
||||||
{
|
{
|
||||||
logprintf (LOG_VERBOSE, _("Length: %s"), legible (*len));
|
logprintf (LOG_VERBOSE, _("Length: %s"), legible (*len));
|
||||||
|
Loading…
Reference in New Issue
Block a user