Skip to content

Commit

Permalink
Merge pull request #1432 from dstufft/set-accept-header
Browse files Browse the repository at this point in the history
Add Accept: text/html header when processing an index
  • Loading branch information
dstufft committed Jan 7, 2014
2 parents c2361e7 + 325cd51 commit 964c1ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pip/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ def get_page(cls, link, req, cache=None, skip_archives=True, session=None):
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
Expand Down

0 comments on commit 964c1ce

Please sign in to comment.