mirror of
https://github.com/mirror/wget.git
synced 2025-02-05 09:10:12 +08:00
Revert "Bail out on unexpected 416 server errors"
This reverts commit 6f3b995993
.
The code is obviously wrong, see https://savannah.gnu.org/bugs/?54963
Also, the example from the original post doesn't work any more.
With other words, the broken server behavior has been fixed meanwhile.
This commit is contained in:
parent
a3643c6076
commit
11fad3fa72
10
src/http.c
10
src/http.c
@ -3965,16 +3965,6 @@ gethttp (const struct url *u, struct url *original_url, struct http_stat *hs,
|
||||
}
|
||||
}
|
||||
|
||||
if (statcode == HTTP_STATUS_RANGE_NOT_SATISFIABLE
|
||||
&& hs->restval < (contlen + contrange))
|
||||
{
|
||||
/* The file was not completely downloaded,
|
||||
yet the server claims the range is invalid.
|
||||
Bail out. */
|
||||
CLOSE_INVALIDATE (sock);
|
||||
retval = RANGEERR;
|
||||
goto cleanup;
|
||||
}
|
||||
if (statcode == HTTP_STATUS_RANGE_NOT_SATISFIABLE
|
||||
|| (!opt.timestamping && hs->restval > 0 && statcode == HTTP_STATUS_OK
|
||||
&& contrange == 0 && contlen >= 0 && hs->restval >= contlen))
|
||||
|
Loading…
Reference in New Issue
Block a user