open-sw/pkg-cacher — pull request #12 by Robert-Nelson (2014-03-23 18:25:12+00:00)
Title: Add chunked transfer support and retry after malformed responses

If a server downloads using chunked transfers there is no Content-Length
so manufacture one.

Some Fedora mirrors using nginx are returning bogus responses without
the proper response headers causes failures. Ignore them and retry up
to five times.

Ignore body callbacks on HEAD requests, they are usually html formatted
error messages from broken nginx mirrors.

Fix version in User-Agent header.