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:
Christopher Wolfe 2019-01-09 13:52:54 -05:00
parent 3156db2bac
commit 259f6e30e7

View file

@ -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'])],