From 259f6e30e7b1a6cba5e267bfaa679aa2679f7df1 Mon Sep 17 00:00:00 2001 From: Christopher Wolfe Date: Wed, 9 Jan 2019 13:52:54 -0500 Subject: [PATCH] When response header lacks Content-Type, _http_resp_deserialize() gives up. It does not try to deserialize the response body. --- sprockets/mixins/http/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sprockets/mixins/http/__init__.py b/sprockets/mixins/http/__init__.py index d01ba9d..cbe9a6f 100644 --- a/sprockets/mixins/http/__init__.py +++ b/sprockets/mixins/http/__init__.py @@ -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'])],