From cf9c82b13141543e3e6523797c8fcd727f5aa03f Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 11 Sep 2019 11:00:55 +0100 Subject: force content-length on to REST API responses --- modules/rest_api.py | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/rest_api.py') diff --git a/modules/rest_api.py b/modules/rest_api.py index d649bb4d..33701abd 100644 --- a/modules/rest_api.py +++ b/modules/rest_api.py @@ -36,6 +36,7 @@ class Response(object): headers[key] = value if not has_content_type: headers["Content-Type"] = self.content_type + headers["Content-Length"] = len(self._data) return headers def get_data(self): -- cgit v1.3.1-10-gc9f91