2017-09-14 10:04:20 +02:00
|
|
|
Index: wget-1.19.1/src/http.c
|
|
|
|
===================================================================
|
|
|
|
--- wget-1.19.1.orig/src/http.c
|
|
|
|
+++ wget-1.19.1/src/http.c
|
2017-09-14 12:11:48 +02:00
|
|
|
@@ -3819,6 +3819,16 @@ gethttp (const struct url *u, struct url
|
2017-09-14 10:04:20 +02:00
|
|
|
}
|
|
|
|
|
2017-09-14 12:11:48 +02:00
|
|
|
if (statcode == HTTP_STATUS_RANGE_NOT_SATISFIABLE
|
2017-09-14 11:31:41 +02:00
|
|
|
+ && hs->restval < (contlen + contrange))
|
2017-09-14 10:04:20 +02:00
|
|
|
+ {
|
2017-09-14 11:31:41 +02:00
|
|
|
+ /* The file was not completely downloaded,
|
|
|
|
+ yet the server claims the range is invalid.
|
|
|
|
+ Bail out. */
|
|
|
|
+ CLOSE_INVALIDATE (sock);
|
|
|
|
+ retval = RANGEERR;
|
|
|
|
+ goto cleanup;
|
2017-09-14 10:04:20 +02:00
|
|
|
+ }
|
2017-09-14 12:11:48 +02:00
|
|
|
+ if (statcode == HTTP_STATUS_RANGE_NOT_SATISFIABLE
|
2017-09-14 10:04:20 +02:00
|
|
|
|| (!opt.timestamping && hs->restval > 0 && statcode == HTTP_STATUS_OK
|
|
|
|
&& contrange == 0 && contlen >= 0 && hs->restval >= contlen))
|
2017-09-14 12:11:48 +02:00
|
|
|
{
|