From b53f8d0f8f3daa51f6d2bf87c2fc2096c6bbdf78 Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Thu, 27 Feb 2020 11:40:55 +0100 Subject: Send complete HTTP header when response has no body --- src/ogRest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ogRest.py b/src/ogRest.py index c68eb0e..a35ff5d 100644 --- a/src/ogRest.py +++ b/src/ogRest.py @@ -63,7 +63,8 @@ class restResponse(): self.msg += '\r\nContent-Type: application/json' self.msg += '\r\n\r\n' + json_body.dump() else: - self.msg += '\r\n' + self.msg += 'Content-Length: 0\r\n' \ + 'Content-Type: application/json\r\n\r\n' def get(self): -- cgit v1.2.3-18-g5258