mirror of
https://github.com/sprockets/sprockets.mixins.http.git
synced 2024-11-15 03:00:29 +00:00
When response header lacks Content-Type, _http_resp_deserialize() gives up.
It does not try to deserialize the response body.
This commit is contained in:
parent
3156db2bac
commit
259f6e30e7
1 changed files with 2 additions and 0 deletions
|
@ -278,6 +278,8 @@ class HTTPClientMixin(object):
|
|||
"""
|
||||
if not response.body:
|
||||
return None
|
||||
if 'Content-Type' not in response.headers:
|
||||
return response.body
|
||||
try:
|
||||
content_type = algorithms.select_content_type(
|
||||
[headers.parse_content_type(response.headers['Content-Type'])],
|
||||
|
|
Loading…
Reference in a new issue