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:
commit
964c1ce05d
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue