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:
Tim Rühsen 2018-11-09 16:16:43 +01:00
parent a3643c6076
commit 11fad3fa72

View File

@ -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))