pypa/pip — pull request #984 by dstufft (2013-06-07 12:46:19+00:00)
Title: Do a check prior to returning HTMLPage that it is indeed html

Previously pip would check with a HEAD request if the url looked
like it contained an archive and skip the file. However this didn't
work if the url didn't look like an archive and instead just
redirected to an archive.

This will therefore, after the url has been fetched, inspect the
headers and look to see if the Content-Type is text/html.

This fixes #983