Send complete HTTP header when response has no body

more_events
Roberto Hueso Gómez 2020-02-27 11:40:55 +01:00 committed by Alvaro Neira Ayuso
parent a85c113ee7
commit b53f8d0f8f
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ class restResponse():
self.msg += '\r\nContent-Type: application/json' self.msg += '\r\nContent-Type: application/json'
self.msg += '\r\n\r\n' + json_body.dump() self.msg += '\r\n\r\n' + json_body.dump()
else: else:
self.msg += '\r\n' self.msg += 'Content-Length: 0\r\n' \
'Content-Type: application/json\r\n\r\n'
def get(self): def get(self):