Fix URLs with no content type header.
This commit is contained in:
parent
1cc7d39047
commit
8259a01d64
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ class ComicImage(object):
|
|||
self.urlobj = getImageObject(self.url, self.referrer, self.session)
|
||||
except IOError as msg:
|
||||
raise IOError('error retrieving URL %s: %s' % (self.url, msg))
|
||||
content_type = unquote(self.urlobj.headers.get('content-type'))
|
||||
content_type = unquote(self.urlobj.headers.get('content-type', 'application/octet-stream'))
|
||||
content_type = content_type.split(';', 1)[0]
|
||||
if '/' in content_type:
|
||||
maintype, subtype = content_type.split('/', 1)
|
||||
|
|
Loading…
Reference in a new issue