From 504c83662a970ffed2d50247355e1d87f0a79fe1 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 a73ca269..994c1b66 100644 --- a/pySim/esim/http_json_api.py +++ b/pySim/esim/http_json_api.py @@ -339,7 +339,7 @@ class JsonHttpApiClient(): raise HttpStatusError(response) resp_content_type = response.headers.get('Content-Type') - if response.content and not resp_content_type.startswith(req_headers['Content-Type']): + if not resp_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.'):