From b9edcb0fb71e720b4b988ab2b70aa9f87268e931 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 3 Mar 2026 23:47:45 +0100 Subject: [PATCH] Revert "http_json_api: Only require Content-Type if response body is non-empty" This reverts commit e0a9e73267f18fed1d81874938f5e2831afd12e6. --- pySim/esim/http_json_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/esim/http_json_api.py b/pySim/esim/http_json_api.py index 28022ffa..0154947e 100644 --- a/pySim/esim/http_json_api.py +++ b/pySim/esim/http_json_api.py @@ -337,7 +337,7 @@ class JsonHttpApiClient(): # SGP.22, section 6.5.1) if response.status_code != self.api_func.expected_http_status: raise HttpStatusError(response) - if response.content and not response.headers.get('Content-Type').startswith(req_headers['Content-Type']): + if 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)