From 828a50e4f37b2d18ead2a020b0b272594faf2c9d Mon Sep 17 00:00:00 2001 From: hniksic Date: Sat, 19 Mar 2005 09:38:46 -0800 Subject: [PATCH] [svn] Undo the 2004-11-18 change to fd_read_body. Instead, always use the "exact" flag. --- src/ChangeLog | 5 +++++ src/retr.c | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 67059694..2e996aa0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-03-15 Hrvoje Niksic + + * retr.c (fd_read_body): Undo the 2004-11-18 change. Instead, + always be "exact". + 2005-03-17 Hrvoje Niksic * ftp-basic.c (ftp_login): Don't free the string if ftp_response diff --git a/src/retr.c b/src/retr.c index 978fb728..ad075f2f 100644 --- a/src/retr.c +++ b/src/retr.c @@ -214,7 +214,8 @@ fd_read_body (int fd, FILE *out, wgint toread, wgint startpos, data arrives slowly. */ int progress_interactive = 0; - int exact = flags & rb_read_exactly; + /*int exact = flags & rb_read_exactly;*/ + int exact = 1; wgint skip = 0; /* How much data we've read/written. */ @@ -285,13 +286,6 @@ fd_read_body (int fd, FILE *out, wgint toread, wgint startpos, } ret = fd_read (fd, dlbuf, rdsize, tmout); - /* when retrieving from http-proxy wget sometimes does not trust the - * file length reported by server. - * this check is to tell wget not to stubbornly try to read again and - * again until another errno code was received. */ - if ( ret == -1 && errno == ETIMEDOUT && sum_read == toread && toread > 0 ) - break; - if (ret == 0 || (ret < 0 && errno != ETIMEDOUT)) break; /* read error */ else if (ret < 0) -- 2.39.2