From: hniksic Date: Fri, 11 May 2001 12:37:37 +0000 (-0700) Subject: [svn] Before concluding that the file is already fully retrieved, make sure X-Git-Tag: v1.13~2145 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=9588e1af8012721db889faea24a771fd2763e50e [svn] Before concluding that the file is already fully retrieved, make sure that the file existed and `Range' was actually requested. Published in . --- diff --git a/src/ChangeLog b/src/ChangeLog index 918b0590..6666f589 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2001-05-09 Hrvoje Niksic + + * http.c (gethttp): Before concluding that the file is already + fully retrieved, make sure that the file existed and `Range' was + actually requested. + 2001-05-09 Hrvoje Niksic * cookies.c (eliminate_dups): New function. diff --git a/src/http.c b/src/http.c index bf6a57ea..23ed7ddc 100644 --- a/src/http.c +++ b/src/http.c @@ -1190,7 +1190,11 @@ Accept: %s\r\n\ if (opt.always_rest) { /* Check for condition #2. */ - if (hs->restval >= contlen) + if (hs->restval > 0 /* restart was requested. */ + && contlen != -1 /* we got content-length. */ + && hs->restval >= contlen /* file fully downloaded + or has shrunk. */ + ) { logputs (LOG_VERBOSE, _("\ \n The file is already fully retrieved; nothing to do.\n\n"));