open-sw / pkg-cacher

This is a transparent cache for Debian and RedHat packages (.deb and .rpm). It is based on apt-cacher available on Debian. It has been enhanced to handle RedHat repositories and files whose names are the same but the contents are different.
15 stars 12 forks source link

Add chunked transfer support and retry after malformed responses #12

Closed Robert-Nelson closed 10 years ago

Robert-Nelson commented 10 years ago

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.