mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix duplicate Content-Type header for some resources
This commit is contained in:
parent
5db33faeb8
commit
79f47bfd8a
@ -499,7 +499,7 @@ class HTTPConnection(HTTPRequest):
|
||||
|
||||
ct = outheaders.get('Content-Type', '')
|
||||
if ct.startswith('text/') and 'charset=' not in ct:
|
||||
outheaders.set('Content-Type', ct + '; charset=UTF-8')
|
||||
outheaders.set('Content-Type', ct + '; charset=UTF-8', replace_all=True)
|
||||
|
||||
buf = [HTTP11 + (' %d ' % data.status_code) + httplib.responses[data.status_code]]
|
||||
for header, value in sorted(outheaders.iteritems(), key=itemgetter(0)):
|
||||
|
Loading…
x
Reference in New Issue
Block a user