favicon fetcher: provide an Accept header on requests.

This makes the fetcher work with the default ModSecurity ruleset, and would also avoid providing unsupported favicon formats (e.g. webp), by explictly preferring PNG and
x-icon formats.
This commit is contained in:
Diego Elio Pettenò 2017-08-16 18:21:14 +00:00
parent bf63deec54
commit 4ff8ed7798

View file

@ -269,6 +269,7 @@ class IconImporter(object):
self.feed.permalink
),
'Connection': 'close',
'Accept': 'image/png,image/x-icon,image/*;q=0.9,*/*;q=0.8'
}
try:
request = urllib2.Request(url, headers=headers)