diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-02-27 11:40:55 +0100 |
---|---|---|
committer | Alvaro Neira Ayuso <aneira@soleta.eu> | 2020-03-02 09:32:40 +0100 |
commit | b53f8d0f8f3daa51f6d2bf87c2fc2096c6bbdf78 (patch) | |
tree | 52d1d51c4f5d2cede21f577c5291b282e532d4a7 /src/ogRest.py | |
parent | a85c113ee7aeaf7348de83fe3aa4dcd9d525a8bf (diff) |
Send complete HTTP header when response has no body
Diffstat (limited to 'src/ogRest.py')
-rw-r--r-- | src/ogRest.py | 3 |
1 files changed, 2 insertions, 1 deletions
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): |