]> git.saurik.com Git - apt.git/commit
retry without partial data after a 416 response
authorDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 16 Sep 2013 21:21:11 +0000 (23:21 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 1 Oct 2013 09:04:14 +0000 (11:04 +0200)
commit331e8396ee5a4f2e7d276eddc54749b2a13dd789
tree7b01e67de8faaf7ffbc6ea27b89ad6a50b64b157
parent14c84d021d82335255275f1eabf3a856bde4df07
retry without partial data after a 416 response

If we get a 416 from the server it means the Range we asked for is above
the real filesize of the file on the server. Mostly this happens if the
server isn't supporting If-Range, but regardless of how we end up with
the partial data, the data is invalid so we discard it and retry with a
fresh plate and hope for the best.

Old behavior was to consider 416 an error and retry with a different
compression until we ran out of compression and requested the
uncompressed file (which doesn't exist on most mirrors) with an accept
line which server answered with "406 Not Acceptable".

Closes: 710924
methods/http.cc
test/integration/test-releasefile-verification