Revert "http_json_api: Only require Content-Type if response body is non-empty"

This reverts commit e0a9e73267.
This commit is contained in:
Neels Hofmeyr committed 2026-04-09 22:19:18 +02:00
1 parent da8b3456b3
commit fe9a61a1ba
1 file changed
+1 -1
+1 -1
View File
@@ -337,7 +337,7 @@ class JsonHttpApiClient():
# SGP.22, section 6.5.1) # SGP.22, section 6.5.1)
if response.status_code != self.api_func.expected_http_status: if response.status_code != self.api_func.expected_http_status:
raise HttpStatusError(response) 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) raise HttpHeaderError(response)
if not response.headers.get('X-Admin-Protocol', 'gsma/rsp/v2.unknown').startswith('gsma/rsp/v2.'): if not response.headers.get('X-Admin-Protocol', 'gsma/rsp/v2.unknown').startswith('gsma/rsp/v2.'):
raise HttpHeaderError(response) raise HttpHeaderError(response)