diff --git a/pySim/esim/http_json_api.py b/pySim/esim/http_json_api.py index e640b3fa..36caac93 100644 --- a/pySim/esim/http_json_api.py +++ b/pySim/esim/http_json_api.py @@ -330,7 +330,7 @@ class JsonHttpApiClient(): # SGP.22, section 6.5.1) if response.status_code != self.api_func.expected_http_status: raise HttpStatusError(response) - if not response.headers.get('Content-Type').startswith(req_headers['Content-Type']): + if response.content and not response.headers.get('Content-Type').startswith(req_headers['Content-Type']): raise HttpHeaderError(response) if not response.headers.get('X-Admin-Protocol', 'gsma/rsp/v2.unknown').startswith('gsma/rsp/v2.'): raise HttpHeaderError(response)