1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Merge pull request #1432 from dstufft/set-accept-header

Add Accept: text/html header when processing an index
This commit is contained in:
Donald Stufft 2014-01-07 01:07:37 -08:00
commit 964c1ce05d

View file

@ -675,7 +675,7 @@ class HTMLPage(object):
url = urlparse.urljoin(url, 'index.html')
logger.debug(' file: URL is directory, getting %s' % url)
resp = session.get(url)
resp = session.get(url, headers={"Accept": "text/html"})
resp.raise_for_status()
# The check for archives above only works if the url ends with