Boulder messaes up Content-Type

This commit is contained in:
Jakub Warmuz
2015-03-25 06:03:16 +00:00
parent 1e45edd548
commit 66bc89f186
+5 -4
View File
@@ -66,10 +66,11 @@ class Network(object):
logging.debug('Received response %s: %s', response, response.text)
if not response.ok:
if response.content_type == 'application/json':
raise messages2.Error.from_json(response.json())
else:
raise errors.NetworkError(response)
# Boulder messes up Content-Type #56
#if response.headers['content-type'] == 'application/json':
raise messages2.Error.from_json(response.json())
#else:
# raise errors.NetworkError(response)
# TODO: Boulder messes up Content-Type #56
#if response.headers['content-type'] != content_type: