forked from public/pysim
Revert "http_json_api: Only require Content-Type if response body is non-empty"
This reverts commit e0a9e73267.
This commit is contained in:
@@ -339,7 +339,7 @@ class JsonHttpApiClient():
|
|||||||
raise HttpStatusError(response)
|
raise HttpStatusError(response)
|
||||||
|
|
||||||
resp_content_type = response.headers.get('Content-Type')
|
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)
|
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.'):
|
||||||
|
|||||||
Reference in New Issue
Block a user